Vous êtes sur la page 1sur 45

User's guide

to

LMSchartmaker
1997-2011 Medical Research Council, UK

Huiqi Pan Tim Cole

User's Guide to LMSchartmaker

Table of Contents
Foreword 0

Part I Introduction

1 What is LMSchartmaker ................................................................................................................................... 4 2 LMSchartmaker Light ................................................................................................................................... 4 3 LMSchartmaker Pro ................................................................................................................................... 4 4 Notes ................................................................................................................................... 4 5 Contact Us ................................................................................................................................... 4

Part II Data Entry

1 Opening an Existing File ................................................................................................................................... 4 2 Creating New Data ................................................................................................................................... 6

Part III Data Display, Editing & Selection

1 Data Display ................................................................................................................................... 7 2 Data Summary ................................................................................................................................... 7 3 Data Editing ................................................................................................................................... 9 4 Data Selection ................................................................................................................................... 9

Part IV Modelling

11

1 Model Selection ................................................................................................................................... 11 2 Model Fitting ................................................................................................................................... 11 3 Automated Model Fitting with the Loop ................................................................................................................................... 12 4 Model Monitoring ................................................................................................................................... 12 5 Model Checking ................................................................................................................................... 13 6 Choosing edf ................................................................................................................................... 13 7 Choosing the Age Option ................................................................................................................................... 14 8 Choosing the Deviance Measure ................................................................................................................................... 14

Part V Model Saving

14

1 The System File ................................................................................................................................... 14 2 How to Save ................................................................................................................................... 15 3 Save the ................................................................................................................................... 15 Model 4 Save the ................................................................................................................................... 15 Model or Z Scores 5 Export the L,M,S and/or Centiles ................................................................................................................................... 15

Part VI Graphical Display and Editing

16

1 Graphical Display ................................................................................................................................... 16


How to display Graphs ......................................................................................................................................................... 16

1997-2011 Medical Research Council, UK

Contents

II

Data Plot ......................................................................................................................................................... 17 Z Scores ......................................................................................................................................................... 17 Detrended Q-Q Plot ......................................................................................................................................................... 18 Q Tests for Fit ......................................................................................................................................................... 19 L Curve ......................................................................................................................................................... 19 M Curve ......................................................................................................................................................... 20 S Curve ......................................................................................................................................................... 21 Centiles ......................................................................................................................................................... 21 M Curve Velocity ......................................................................................................................................................... 22 M Curve Acceleration ......................................................................................................................................................... 23

2 Graph Editing and Copying ................................................................................................................................... 23


Graph Editing ......................................................................................................................................................... 23 Graph Resizing ......................................................................................................................................................... 24 Graph Copy ......................................................................................................................................................... 24

Part VII Print Active Window Part VIII Example of Free Format with LMSchartmaker Light

24

1 How to Print an Active Window ................................................................................................................................... 24

24

1 Example ................................................................................................................................... 24 of Free Format 2 Fit Model................................................................................................................................... 24 Step by Step 3 Open Data in Free Format ................................................................................................................................... 25 4 Display Data ................................................................................................................................... 26 5 Rename Measure to Weight ................................................................................................................................... 26 6 Model of ................................................................................................................................... 27 Weight (030503o) 7 Q Tests for Fit Weight (030503o) ................................................................................................................................... 27 8 Model of ................................................................................................................................... 28 Weight (030603o) 9 Q Tests for Fit Weight (030603o) ................................................................................................................................... 28 10 Model of ................................................................................................................................... 29 Weight (030603r) 11 Q Tests for Fit Weight (030603r) ................................................................................................................................... 29 12 Model of ................................................................................................................................... 30 Weight (030703r) 13 Q Tests for Fit Weight (030703r) ................................................................................................................................... 30

Part IX Example of Fixed Width with LMSchartmaker Pro

31

1 Example ................................................................................................................................... 31 of Fixed Width 2 Fit Model................................................................................................................................... 31 Step by Step 3 Open Data for Fixed Width ................................................................................................................................... 31 4 Rename Measure to BMI ................................................................................................................................... 32 5 Display Data ................................................................................................................................... 33 6 Model of ................................................................................................................................... 33 BMI (030503o) 7 Model of ................................................................................................................................... 34 BMI (030503t, 0.5,0) 8 Model of ................................................................................................................................... 36 BMI (030803t, 0.5,0)

1997-2011 Medical Research Council, UK

III

User's Guide to LMSchartmaker 9 Model of ................................................................................................................................... 37 BMI (030803t, 0.3,0)

Part X Preferences

37

1 Summary ................................................................................................................................... 37 2 Centiles ................................................................................................................................... 37 3 Limits ................................................................................................................................... 38 4 Weighting ................................................................................................................................... 39 5 Register ................................................................................................................................... 39

Part XI Glossary of terms

40

1 Missing Values ................................................................................................................................... 40 2 Power and Offset ................................................................................................................................... 40 3 Default Name ................................................................................................................................... 40 4 edf ................................................................................................................................... 40

Part XII Glossary of Statistics

41

1 Deviance................................................................................................................................... 41 2 Z scores ................................................................................................................................... 41 3 Q Tests ................................................................................................................................... 41 4 Chi Statistic for Q Tests ................................................................................................................................... 41 5 Q Statistic for Q Tests ................................................................................................................................... 42 6 Detrended Q-Q Plot ................................................................................................................................... 43

Part XIII Acknowledgement Part XIV Statistical References Part XV Window Stacked and Customised Index

43 43 44 0

1 Acknowledgement ................................................................................................................................... 43

1 References ................................................................................................................................... 43

1997-2011 Medical Research Council, UK

Introduction

1
1.1

Introduction
What is LMSchartmaker
LMSchartmaker is a program to fit smooth centile curves to reference data using the LMS method. Reference centile curves show the distribution of a measurement as it changes according to some covariate, e.g. age. The LMS method summarises the changing distribution by three curves representing the median (M), coefficient of variation (S) and skewness (L), the latter expressed as a Box-Cox power. Using penalised likelihood the three curves can be fitted as cubic splines by non-linear regression, and the extent of smoothing required can be expressed in terms of smoothing parameters or equivalent degrees of freedom. The process involves five stages: data entry, model fitting, graphical display, model checking and model saving, with the last four stages repeated as often as necessary. Data editing and graph editing are also available from menu Edit. In addition LMSchartmaker Pro allows you to use weighting, selecting group and goodness of fit tests. Start LMSchartmaker by clicking Start, Programs and LMS. To exit click Exit from the File menu, that is click File|Exit.

1.2

LMSchartmaker Light
LMSchartmaker Light is the freeware version of LMSchartmaker. It contains data entry, model fitting, graphical display and model checking. You can download LMSchartmaker Light from the web. There is also an extended version of the LMSchartmaker, LMSchartmaker Pro, for which a licence key is needed. Note LMSchartmaker Pro can open a system file saved from LMSchartmaker Light, but LMSchartmaker Light cannot open a system file saved by LMSchartmaker Pro.

1.3

LMSchartmaker Pro
LMSchartmaker Pro is the extended version of LMSchartmaker. It has all the facilities of LMSchartmaker Light, but in addition LMSchartmaker Pro fits models taking into account sample weights and group selection. It also provides improved goodness of fit tests including Q Tests. Contact Health for All Children to obtain a key code to convert LMSchartmaker Light to Pro. Then click on Edit|Preferences|Register to register the key code and upgrade the program.

1.4

Notes
Number of decimal places for age is controlled by LMSchartmaker to avoid numerical instability and speed up the calculations. Non-postive values for measurement, weighting or selector are treated as missing. Any missing values for age or Xaxes should not be coded as negative or zero because LMSchartmaker allows age to be zero or negative. Maximum sample size is 100000 by default. For special need of large sample size please contact us.

1.5

Contact Us
You can contact us in several ways: contact Tim Cole tim.cole@ich.ucl.ac.uk for ordering Health for All Children for technical support (LMSchartmaker Pro users only) lms.help@hotmail.co.uk Note We suggest you use the most recent version of your browser, and periodically check for new versions of LMSchartmaker.

2
2.1

Data Entry
Opening an Existing File
File|Open allows you to open an existing ext file (e.g. *.txt) or LMSchartmaker system file (*.lms) Click on File|Open to bring up an Open dialog box. Open a text file - locate the subdirectory in the Look in box, select Text file (*.txt) or All files (*.*) in the Files of type box, and double-click the file you want to open. This brings up a Data Type dialog box , where you specify the location of the age or time and measure for both LMSchartmaker Light and LMSchartmaker Pro. In LMSchartmaker Pro you can

1997-2011 Medical Research Council, UK

User's Guide to LMSchartmaker


also specify the location of weighting and selecting group if necessary. The first 1000 records of the data are displayed in the Preview box. Select one data format in the middle part of the dialog and specify the location of variables in the bottom part: 1. Free format select free format if data fields in columns are delimited with commas or tabs or spaces, and specify the column number for age and measure. You must specify the column number for age and measure. LMSchartmaker Pro has the option to specify weighting and selector. See an example below. 2. Fixed width select fixed format if each field has a fixed width and specify the start and end position for each field you need. The Preview box shows the location of fields. You must specify the location for age and measure. LMSchartmaker Pro has the option to specify weighting and selector. See an example below. Open an LMSchartmaker system file locate the subdirectory in the Look in box, select system file (*.lms) in the Files of type box, and double-click the file you want to open. This brings up a Data Window together with Data graph, L Curve, M Curve and S Curve graphs. A list of recently opened files is given at the foot of the File menu. Click one of these will load the corresponding file. Note LMSchartmaker Pro can read system files saved by LMSchartmaker Light However LMSchartmaker Light cannot open a system file saved by LMSchartmaker Pro.

Example of opening a free format file with LMSchartmaker Pro

1997-2011 Medical Research Council, UK

Data Entry

2.2

Creating New Data


Alternatively data can be entered from scratch - use File|New. Type the data into the spreadsheet, or alternatively cut and paste it from a spreadsheet. File|New brings up a Data Window for you to type data into the blank columns. The age and measurement need to be put in the first and second columns respectively. The third column for weighting and the fourth for selecting group are only available for LMSchartmaker Pro and optional. There are two ways to create new data in LMSchartmaker: Typing individual data values into the corresponding columns. Data editing allows you to modify the data. Edit|Paste allows you to paste data from the clipboard that you have copied from worksheets or spreadsheets in other applications such as WORD or EXCEL. However there are no facilities for importing worksheets from other applications such as SAS, SPSS or EXCEL. It is recommended that you export an ASCII file from any of these applications and read it as ASCII into LMSchartmaker. See File|Open for details.

1997-2011 Medical Research Council, UK

User's Guide to LMSchartmaker

3
3.1

Data Display, Editing & Selection


Data Display
LMSchartmaker displays data with scatterplot in Data Plot and tables in Data Window. Data Window allows you to view values and summary of data by clicking command buttons: Summary brings up the window of Summary dialog box with tabs of Original Data and LMS Data. The tab of Original Data tells the data file name, location of the measures, total number of records and the number of missing values. The tab of LMS Data summarises the number of positive points, distinct ages, range of age and measure. When groups are available in the data Summary also shows the codes for groups. Go to brings the Go to dialog box, where you type a record number into the text box. PgUp shows the previous 20 records, the previous page of data. PgDn shows the next 20 records, the next page of data. Home goes to the beginning of the data. End goes to the end of the data.

Example of Data Window with LMSchartmaker Pro

3.2

Data Summary
Original Data - shows the information for original data. They are data file name, location of age and measures, total number of records and the number of missing values. The location contains the field number of variables for data in free format and position for both start and end of variables for data in fixed width. LMSchartmaker Pro shows the location for weighting and selector if they are available. LMSchartmaker Pro will also show the name and number of groups if selector is considered. See below for an example. LMS Data - shows the information for data available for LMS model fitting. They are the number of positive points,

1997-2011 Medical Research Council, UK

Data Display, Editing & Selection

distinct ages, range of age and measure. When selector is available LMSchartmaker Pro shows the name and number of groups. See below for an example.

Example of Summary for original data with LMSchartmaker Pro

1997-2011 Medical Research Council, UK

User's Guide to LMSchartmaker

3.3

Data Editing
LMSchartmaker allows you to view and edit data. There are two ways to edit data: Editing individual data values - click in the cell containing the value, type the new value and press <return> or click elsewhere in the window. Editing highlighted data - File|Cut and File|Copy allow you to cut or copy the highlighted data from Data window to the clipboard while File|Clear removes the highlighted data. File|Paste allows you to paste data from the clipboard into the data sheet where the cursor is located. The data set will normally have been copied to the clipboard from another application such as a database, spreadsheet or word processor. To copy data from such an application highlight the data required and use the application's Edit|Copy facility. Edit|Select All highlights all the data. Note Editing data will re-start model fitting. Negative or zero in Weighting is treated as a missing value. Blank in Selecting is considered as missing if you select groups.

3.4

Data Selection
LMSchartmaker Pro allows you to select part of your data by including a column with group codes in the Data Window. Group can be coded either as a number or character with up to 8 digits. For example you can code 1 for male and 2 for female or m for male and f for female. A blank in the group is treated as a missing value. By default LMSchartmaker Pro uses all the data. In addition both LMSchartmaker Pro and Light allow you to select data in the range of age or measurement. To select data click the Select button in the Data Window, to bring up the Select Data dialog with two tabs, Range and Group. Group tab is only enabled for LMSchartmaker Pro with group codes. Range - specify the range in the corresponding boxes and click OK. Group - Highlight the group(s) you want in the Group list box and click OK.

1997-2011 Medical Research Council, UK

Data Display, Editing & Selection

10

Note The Reset button lets you re-set the previous selection and the Select All button brings you back to use all the data.

1997-2011 Medical Research Council, UK

11

User's Guide to LMSchartmaker

4
4.1

Modelling
Model Selection
The model is specified using the Model menu. This involves selecting the right age scale and choosing edf values for L, M and S. There are three choices for the age scale depending on the shape of the M curve: Original Age is suitable for simple M curves - this is the default. Rescaled Age is appropriate for more complicated M curves like weight or height throughout childhood. It works best where the M curve is monotonic, i.e. increasing (or decreasing) throughout the age range. Transformed Age is best for complex M curves that are non-monotonic, i.e. which rise and fall at different times, such as body mass index or skinfold thickness. There are three aspects to choosing proper edf values: Choose the edf in the order: M first, then S and then L. After fitting the initial model fine-tune the edf for the final model. Choose the edf so that: M edf > S edf > L edf. Larger samples need larger edf. If in doubt use a smaller not a larger edf. A choice of fitting one model at a time or a series of models: The check box Loop allows you to switch on or off automated model fitting. See Model Fitting and Model Checking to help you select a model.

4.2

Model Fitting
Click the Model menu to show the Model dialog box. Select the age scale and edf for L, M ans S in the model, then click Fit. The model is fitted and the results displayed: The deviance and edf are in the first line of the lower part of the Model dialog box. The second and third lines contain values for previous model (if fitted) and the difference between present and previous. Four graphs are displayed: L Curve, M Curve, S Curve and Centiles. Graphs for Z scores, Detrended Q-Q Plot and Q Tests (the latter two for LMSchartmaker Pro only) can be obtained from Graph menu. The model is also summarised in the Monitor dialog box, obtained by clicking the Monitor button. To sepcify link for S or M click Edit|Preferences|Link. The default is Identity Link for both S and M. Click on the deviance label in the Model dialog to cycle through various measures of deviance. The aim is to find a model that minimises the measure. Note If the model fails to fit a warning is given and no deviance is presented.

1997-2011 Medical Research Council, UK

Modelling

12

4.3

Automated Model Fitting with the Loop


Models can be fitted one at a time as described above. Alternatively a series of models can be fitted all at once using the Loop facility. To use the Loop: Click the Loop check box, top right in the Model dialog, and extra edf text boxes appear to the right. Specify start and end values for L, M and S edf in the left and right boxes, with end edf larger or equal to start edf. Click Fit, and the Loop fits models for all combinations of edf in these ranges. For example if the L, M and S edf start values are 1, 3, 2 and the end values are 2, 4, 3 then 8 models will be fitted. If our graphs are displayed: L Curve, M Curve, S Curve and Centiles. Four graphs are displayed: L Curve, M Curve, S Curve and Centiles. Click on the deviance label in the Model dialog to cycle through various measures of deviance. The aim is to find a model that minimises the measure.

4.4

Model Monitoring
For each fitted model LMSchartmaker keeps a record of the deviance, edf for L, M and S, the number of cycles, the scale of age, power and offset. To view the records click on the Monitor button in the Model dialog box to bring up the Monitor window. It contains up to 500 models: The first column contains the deviance measure (which appears in the lower part of the Model window, and which is changes by clicking on its label there). To sort the models in ascending order of the deviance measure click Yes at the foot of the Monitor window. Sorted this way the first model is the "best". To rank the models in their order of fitting click No. To plot the deviance measure against edf (only for models fitted with Loop) click Plot. Three curves are plotted in the same window, showing the deviance measure versus edf for L, M and S separately for the current Loop. To re-fit a model select its row and click Re-fit. To print the records click Print. To clear the records click Clear. To copy the records click Edit|Copy. To copy records click Edit|Copy when the Monitor dialog is active. To copy records click Edit|Copy when the Monitor dialog is active.

Monitor dialog box

1997-2011 Medical Research Council, UK

13

User's Guide to LMSchartmaker

4.5

Model Checking
The Model window indicates the fit of the current model as measured by the deviance. When the model changes, the Model window shows the change in edf and the corresponding change in deviance. A cumulative log of the models fitted so far, their deviance and parameters, can be found in the Monitor dialog box. The following are useful: The Z Scores Graph is useful to check outliers. The comparison of current and previous fitted L, M, S curves and centiles. See graphical display for details. The Detrended Q-Q Plot is a detrended form of the Q-Q plot for use as a global diagnostic. The Q Tests for Fit help test goodness of fit when judging a model. A model may be considered adequate if the Q Statistic curves for L, M and S are within the range -2 and +2. Click here to display these graphs for model checking.

4.6

Choosing edf
The order for choosing edf values Choose edf values for L, M and S in the following order: Optimise the M curve by increasing and/or decreasing the edf by 1 until the change in deviance is small. For small datasets (e.g. n < 500) the default edf of 5 may be adequate. For larger datasets (n > 10,000) the edf may reach 15 or more. Optimise the S curve. In many cases the default of 3 edf will be sufficient, though edf up to 10 or more may be needed for larger datasets. Optimise the L curve. The default of 3 edf may be too large in many cases. Try a value of 0, i.e. no skewness adjustment, then 1, which is a constant adjustment at all ages. Then increase edf in steps of 1. Values exceeding 6 are unlikely except for large datasets covering a wide age range. The general rule for choosing edf values The simplest rule for choosing the edf is: use the Loop and minimise the selectd deviance measure. Alternatively, here are some guidelines: Change the edf 1 unit at a time. See how the curve changes shape as the edf change - the curve should be both smooth and a good fit. To see subtle changes in the curve double click in the curve graph window to compare current and previous curves. Watch the change in deviance in the Model window - a change of less than 4 per unit change in edf is modest, 10 or more is substantial. If in doubt, use smaller rather than larger edf.

1997-2011 Medical Research Council, UK

Modelling

14

Sometimes, to clarify the underlying curve shape, it is worth using large edf, say 20+. The resulting curve will be very rough, but it will show whether alternative fits with fewer edf are biased or not. Larger samples need larger edf. In general, M edf > S edf > L edf. If you have LMSchartmaker Pro use the Detrended Q-Q Plot and Q Tests for Fit.

4.7

Choosing the Age Option


The model can be fitted using three alternative transformations of age scale, which are available in the Model dialog box: Original Age (o) original scale shown in Data window. Rescaled Age (r) an empirical transformation based on the shape of the fitted M curve. The M curve is first fitted using the original age scale. The age scale is then mapped (rescaled) to the shape of the M curve, so that the M curve plotted against the rescaled age is a straight line. The M curve is then refitted on the rescaled age scale, and the original age scale is restored. This process can greatly improve the fit of complex monotonic data. Note if the data are non-monotonic, this process can lead to spurious wiggles in the fitted curves at points of inflexion. With this option, the L curve ans S curve are also fitted using rescale age. Transformed Age (t) a power transform of (age+offset)^power, and afterwards the original age scale is restored. Click Transformed Age to bring up the Power Transform dialog box where Power and Offset can be entered. There are two alternatives: typing in a value for Power between -3 and 3. If necessary type in a value for Offset (see below), or click the Default check box to calculate an optimal power, which roughly minimises G.Deviance for power between 0 and 1. A power of zero is the log transform. If the power is zero or the reciprocal of an even value, the value of (age+offset) must be positive so offset>-min(age). With this option the L curve and S curve are also fitted using transformed age. Choice of age scale Using original age for simple forms of M curve. Use rescaled age for more complex monotonic M curves. Use transformed age for non-monotonic M curves where the curvature is greater at one extreme of age than the other (e.g. BMI which is more complex in infancy than later in childhood). Transformed age uses one or two extra parameters (power and offset), which rescale age effectively fits the M curve twice and doubles the number of edf for M.

4.8

Choosing the Deviance Measure


There are five measures of deviance: P.Deviance, SBC, GAIC(3), AIC and G.Deviance. View deviance measure The default deviance is P.Deviance, which is shown in the Model window for the current (and if available the previous) fit, and also in the Monitor window. To change the deviance click repeatedly on the P.Deviance label in the Model window. The label cycles as P.Deviance->SBC->GAIC(3)->AIC-> G.Deviance. To view the formula for the deviance, either move the cursor over the deviance label in the Model window, or see under deviance. The choice of deviance measure The different deviance measures penalize the deviance for the complexity of the model in different ways, so that minimising the deviance measure gives a model which fits well but is not over-specified. AIC, GAIC(3) and SBC penalize (i.e. increase) the deviance by a fixed amount for each extra edf 2, 3 and log(n) units respectively. Using AIC the penalty is small, and the edf minimising the AIC will be relatively large, leading to more wiggly curves. For GAIC(3) and particularly SBC the penalty is larger (if n > 20) so the edf minimising the SBC will be smaller and the curves stiffer. Our recommendation is to use SBC or GAIC(3) for model fitting. In our view AIC provides too small a penalty to give optimal curves.

5
5.1

Model Saving
The System File
A system file is identified by the extension of LMS or lms, for example, TEST03050T.LMS or test030503t.lms. The LMSchartmaker gives a default name when saving a model to a file. The LMSchartmaker system file stores the parameters of the fitted model and information about the data used, which LMSchartmaker needs to retrieve the model when it opens the system file later. It contains three parts: 1. The first part contains two lines. The first line gives edf of the L, M and S curves. The second line contains: values of the age scale setting - age scale, power and offset. The value of age scale is coded as: 0 - original age, 1

1997-2011 Medical Research Council, UK

15

User's Guide to LMSchartmaker


- rescaled age, -1 - Transformed age. size of the data used - total number of records, number of positive records and number of distinct ages. use of sample weights and group selection, which are coded as 1 for used and 0 for not. total number of groups - LMSchartmaker Pro only. 2. The second part gives distinct ages and their corresponding L, M and S curves fitted by the model. 3. The third part contains age, measure and Z score, together with weighting and selector for LMSchartmaker Pro. All the data are included with missing values denoted by *. Note Do not edit a system file as it contains information needed by LMSchartmaker to retrieve a model. If you do need to edit the file, first make a copy and then edit the copy.

5.2

How to Save
You can save a fitted model via the menu File: File|Save a system file (*.lms or *.LMS), from which LMSchartmaker can later retrieve the fitted model. For more information, click here. File|Save As either a system file (*.lms or *.LMS) or a text file (*.txt) with Z scores calculated by the fitted model. For details, click here. File|Export to save the fitted L, M, S curves and/or centiles with specified age intervals to a file (*.ept or *.EPT). Click here for more information. All the saved files can be read by NotePad, WordPad, Microsoft Word, Excel etc.

5.3

Save the Model


File|Save becomes available once a model is fitted. It saves an LMSchartmaker system file (*.LMS or *.lms), which contains details of the fitted model and a copy of the original data, along with the calculated Z Scores. The default file name depends on how the data were obtained: If the source was a system file (*.LMS or *.lms) the fitted model is saved to the same file. If the source was a text file or new file a Save As dialog box lets you specify a file name. A default name is offered, which is the file name followed by the edf values and one character (o or r or t) to indicate the choice of age scale. The default file extension is LMS or lms. Note Do not attempt to edit a system file.

5.4

Save the Model or Z Scores


File|Save As becomes available once a model is fitted. It saves an LMSchartmaker system file (*.LMS or *.lms), which contains a copy of the original data along with details of the fitted model. It also allows you to save Z Scores to a text file if you wish. Clicking File|Save As brings a Save As dialog box for you to specify a file name The default file name given by LMSchartmaker depends on how you opened the file: If you opened a system file (*.LMS) the default name is the file name but with the edf and scale age code for the current fitted model. If you opened a text file or new file the default name is the file name followed by the edf values and one character of o or r or t to present the choice of age scale. If you select Save As Type for Z Scores files (*.txt) in the Save As dialog box this allows you to save a text file with age, measurements and Z scores. Note Do not attempt to edit a system file.

5.5

Export the L,M,S and/or Centiles


Values for the L, M, S curves and/or the required centiles can be saved in text form as a *.EPT file, tabulated by age for insertion into a spreadsheet or for publication purposes. For flexibility, common units of age like years, months, days etc can be converted to other units, and there is an option to vary the number of records to be exported for each unit of age. File|Export becomes available once a model is fitted. It brings up the Export dialog box, to save the fitted L, M, S curves and/or centiles to an export file (*.EPT) in text form, which can be opened into other publications such as Excel for editing. The Export dialog box contains two parts to specify the output: Export Options for the setting of the contents allows choice of output the L, M, S curves (default) or Centiles or L, M, S and Centile curves.

1997-2011 Medical Research Council, UK

Model Saving

16

choice of saving With Head Information, which is only available when you opened a text file. It records the field for age, measure, weighting or selector in the original text file. The Head information is given at the beginning of the export file. choice of Set Default allows you to save the Export Option in the LMSchartmaker. Age Units for the setting of age units in export files includes Data and Export let you specify the data units, unit (default), year, month, week or day in the original or export file respectively. For example if the original age unit is years you can choose months in the Export box if you prefer. For every 1 unit of age the program exports 1 record by default, but you can change it. For the example above, with data in years exported as months, if you type 1 in the For every box and type 2 in the Export box, the records in the export file are for 0.5 month intervals.

Export dialog box

6
6.1
6.1.1

Graphical Display and Editing


Graphical Display
How to display Graphs
Graphs are displayed using the Graph menu. LMSchartmaker Light has eight graphs: Data, Z Scores, L Curve, M Curve, S Curve , Centiles, M Curve Velocity and M Curve Acceleration. The Data graph is drawn when the data are read in. The L, M and S curves are drawn, with the selected centiles, when a model is fitted. LMSchartmaker Pro has two extra graphs for model checking: Detrended Q-Q Plot and Q Tests for Fit. The graphs can be manipulated as follows: Show the previous model: for the L, M, S curves and the centile curves, double clicking in the graph window causes the previous model's curve(s) to appear or disappear (where a previous model is available). This allows the curves for the current and previous models to be compared, and highlights the effect on the curves of a change in edf. The current curves appear in black and the previous curves in blue. Superimpose centiles: Centiles can be superimposed on the data plots in the Data or Z Scores graphs. The centile curves are those for the current model, and are added (or removed) by double clicking in the relevant graph window. The centile curves in the Z Scores graph are horizontal straight lines. Superimpose centiles: Centiles can be superimposed on the data plots in the Data or Z Scores graphs. The centile curves are those for the current model, and are added (or removed) by double clicking in the relevant graph window. The centile curves in the Z Scores graph are horizontal straight lines Note When Identify is switched on, double clicking in the Data or Z Scores graph does not switch the centile display.

1997-2011 Medical Research Council, UK

17

User's Guide to LMSchartmaker

6.1.2

Data Plot
A scatter plot of the data against age appears when the data are read in, e.g. using menu File|Open. If it is subsequently closed the same plot can be obtained by selecting Data on the Graph menu. There are two options to displaying the Data Plot: Show centile curves. Double click in the Data Plot window to show or hide centile curves for the current model (where available) superimposed on the data. Identify data points. First click in the Data Plot window to make it active. Then select Edit|Graph and click On in the Identify tab. This turns Identify status on. Now click on a point in the Data Plot window to display its sequence number next to the point, and the Data window scrolls to show the point. This is useful to examine or alter outliers. If the identify tab is on, the sequence number also appears in the Detrended Q-Q Plot or Z Scores graph if open. For details of editing a graph click here. See below for an example of Data Plot. Note 'Add centile curves' and 'Identify data points' do not operate together. If Identify status is on, double clicking does not show or hide centile curves.

An example of Data Plot

6.1.3

Z Scores
Once a model has been fitted, the data can be converted to Z Scores. A graph of the Z scores plotted against age is obtained by selecting Z Scores on the Graph menu. There are two options to displaying the Z Score graph: Show centile curves. Double click in the Z scores graph window to show or hide centile curves for the current model (where available) superimposed on the individual Z scores. The centile curves appear as horizontal straight lines. Identify data points. First click in the window to make it active. Then select Edit|Graph and click On in the Identify tab. This turns Identify status on. Now click on a point in the Z scores graph to display its sequence number next to the point, and the Data window scrolls to show the point. This is useful to examine or alter outliers. If the identify tab is on, the sequence number also appears in the Data Plot graph or Detrended Q-Q Plot if open. For details of editing a graph click here. See below for an example of Z Scores Plot. Note 'Show centile curves' and 'Identify data points' do not operate together. If Identify status is on, double clicking does not show or hide centile curves.

1997-2011 Medical Research Council, UK

Graphical Display and Editing

18

6.1.4

Detrended Q-Q Plot


Detrended Q-Q Plot is a detrended form of Q-Q plot or Normal plot. Q-Q plot displays the quantile of the observed or empirical distribution against that of the Normal distribution. The Detrended Q-Q Plot accounts for the deviations between the observed and expected quantiles and displays the deviations (vertical axis) against the expected Normal quantile. The Detrended Q-Q Plot tests the Normality of the Z scores. Click Graph and select Detrended Q-Q Plot to display the plot. Identifying a data point is useful to examine outliers. First click on the graph window to make it active. Then select Edit|graph and click On in the Identify tab. This turns Identify status on. Now click on a point in the plot to display its sequence number next to the point, and the Data window scrolls to show the point. If the Identify tab is on the sequence number also appears in the Data Plot or Z Scores graph if open. For details of editing a graph click here. See below for an example of the Detrended Q-Q Plot. Note Only a LMSchartmaker Pro user can display a Detrended Q-Q Plot.

An example of Detrended Q-Q Plot with LMSchartmaker Pro

1997-2011 Medical Research Council, UK

19

User's Guide to LMSchartmaker

6.1.5

Q Tests for Fit


Q Tests are used to check goodness of fit. The values of the Q statistic for M, S, L and kurtosis in different numbers of age groups are calculated. These values of the Q statistic are then plotted against the adjusted degrees of freedom. To display the Q Tests graph click the Graph menu and select Q Tests for Fit. There are four different colour curves in the Goodness of fit graph: 1. Blue values of Q statistic for M curve. 2. Green values of Q statistic for S curve. 3. Cyan values of Q statistic for L curve. 4. Red values of Q statistic for Kurtosis. For details of editing a graph click here. See below an example of Q Tests for Fit Graph. Note Only LMSchartmaker Pro users can access Graph|Q Tests for Fit.

An example of Q Tests Graph

6.1.6

L Curve
The L curve is the smoothed curve of the Box-Cox power transformation plotted against age. The L curve appears automatically when a model is first fitted. If it is subsequently closed the same plot can be obtained by selecting L Curve on the Graph menu, so long as a model is available. Double click in the graph window to show or hide the L curve for the previous model, where available. The previous curve appears in blue, with the current curve in black. This highlights the effect on the L curve of a change in the model. For details of editing a graph click here. See below for an example of L Curve.

1997-2011 Medical Research Council, UK

Graphical Display and Editing

20

6.1.7

M Curve
The M curve is the smoothed median of the measurement plotted against age. It corresponds to the median curve on a conventional growth chart. The M curve appears automatically when a model is first fitted. If it is subsequently closed the same plot can be obtained by selecting M Curve on the Graph menu, so long as a model is available. There is two M curve options: Show previous model. Double click in the graph window to show or hide the M curve for the previous model, where available. The previous curve appears in blue, with the current curve in black. This highlights the effect on the M curve of a change in the model. Alter axes. See (jump) Edit Graph for options to alter the M curve axes. For details of editing a graph click here. See below for an example of M Curve.

An example of M Curve

1997-2011 Medical Research Council, UK

21

User's Guide to LMSchartmaker

6.1.8

S Curve
The S curve is the smoothed curve of the measurement's coefficient of variation as it changes with age. The S curve appears automatically when a model is first fitted. If it is subsequently closed the same plot can be obtained by selecting S Curve on the Graph menu, so long as a model is available. Double click in the graph window to show or hide the S curve for the previous model, where available. The previous curve appears in blue, with the current curve in black. This highlights the effect on the S curve of a change in the model. For details of editing a graph click here. See below for an example of S Curve.

6.1.9

Centiles
Centile curves are smoothed curves calculated from the L curve, M curve and S curve, which in turn depend on the current model. The Centiles Graph appears automatically when a model is first fitted. If it is subsequently closed the same plot can be obtained by selecting Centiles on the Graph menu, so long as a model is available. There is two options for display the graph: Show previous model. Double click in the graph window to show or hide the centile curves for the previous model, where available. The previous curves appear in blue, with the current curves in black. This highlights the effect on the centiles of a change in the model. Select centiles. Edit|Preferences|Centiles changes the number or spacings of the centiles. For details of editing a graph click here. See below for an example of Centiles Graph.

1997-2011 Medical Research Council, UK

Graphical Display and Editing

22

6.1.10 M Curve Velocity


The M Curve Velocity is the first derivative of the M curve plotted against age. Click Graph|M Curve Velocity to display the M velocity curve if a model has been fitted. It provides a more sensitive indicator of smoothness than the M curve itself. Double click in the graph window to show or hide the velocity curve for the previous model, where available. The previous velocity curve appears in blue, with the current curve in black. This highlights the effect on the velocity curve of a change in the model. For details of editing a graph click here. See below for an example of M Curve Velocity Graph.

1997-2011 Medical Research Council, UK

23

User's Guide to LMSchartmaker

6.1.11 M Curve Acceleration


The M Curve Acceleration is the second derivative of the M curve plotted against age. Click Graph|M Curve Acceleration to display the acceleration curve if a model has been fitted. It provides a more sensitive indicator of smoothness than the M curve or M velocity curve. Double click in the graph window to show or hide the acceleration curve for the previous model, where available. The previous acceleration curve appears in blue, with the current curve in black. This highlights the effect on the acceleration curve of a change in the model. For details of editing a graph click here. See below for an example of M Curve Acceleration Graph.

6.2
6.2.1

Graph Editing and Copying


Graph Editing
First select the graph by clicking in it, then click Edit|Graph for a Edit Graph dialog box which contains the tabs Title, Scale and Identify. Title tab lets you insert or edit titles for the axes or graph, that is, a title along the top of the graph. Scale tab lets you set, for each axis, the minimum and maximum values and the number of tick marks. Identify tab lets you set either Identify On or Off for the Data graph, Detrended Q-Q Plot and Z Scores graph by clicking the radio button On or Off. Once identify status is on, then clicking on a point in the graph makes a number appear next to it which is the row in the Data window containing that point. The data can be edited or deleted as necessary and the model refitted. You may need to resize a graph to obtain appropriate and clear labels and titles. Note If identity status is on for the graph you are not allowed to use double clicking to add or remove the centiles on the Data or Z Scores graph.

1997-2011 Medical Research Council, UK

Graphical Display and Editing

24

6.2.2

Graph Resizing
A graph is sized with the window, so to resize the graph resize the graph window. Use the maximum button at the upperright corner of the graph window to maximise the graph.

6.2.3

Graph Copy
Graphs can be copied to other applications, for example Word or Excel. The graphs are those of Data, L Curve, M Curve, S Curve, Centiles, Z Scores, Q Tests for Fit, Detrended Q-Q, M Curve Velocity and M Curve Acceleration. You may need to edit the graph or resize a graph to obtain appropriate and clear labels and titles. Click the graph you want to copy and click Edit|Copy to copy the active graph window to the clipboard. Then you can paste it to other applications.

7
7.1

Print Active Window


How to Print an Active Window
Click the window you want to print then click File|Print Active Window. Reply Yes or No to the message 'Including window border in copied image?' then the window is printed. Note Copying or printing the Data window covers only the current page.

8
8.1

Example of Free Format with LMSchartmaker Light


Example of Free Format
The example_free_format.txt is a tab-delimited text file. It contains six columns, age (year), weight (kg), height (cm), body mass index (BMI) (kg/m2), group and weighting. There are 1073 records in total. Weight is selected to be fit in the example. .08 .08 .09 .09 .1 .11 ........ 3.7 3.7 3 4.4 4.2 4.1 53.8 53.8 53.5 57.3 56.8 53.4 12.78 12.78 10.48 13.4 13.02 14.38 1 2 2 1 2 1 5.4 5.2 2.65 2.66 3.14 5.55

8.2

Fit Model Step by Step


Step by step with LMSchartmaker Light Given in this section is the introduction of how to open a free format text file, select model parameters, fit and test the model. Data file, example_free_format.txt, is used for illustration with LMSchartmaker Light. 1. Click File|Open, the Files of type box selects text file by default, you click the file example_free_format.txt and then click Open. The Data Type dialog box is brought up with default of Free Format. 2. View the data in the Preview box knowing that the data is free formatted and age is in the first column and weight in the second column. Type 1 in the box under Column Number of Age and 2 for Measure and click OK. Data window and Data Plot window are then loaded. 3. Click Rename in the Data window and type Weight in the Measure box in the loaded Rename dialog box to replace Measure, then click OK. Now the title Measure is changed to be Weight in both Data window and Data Plot window. 4. Click menu Model and then click Fit in the loaded Model dialog box to fit a model with the default edf of 3, 5, 3 and original age scale. L, M, S and Centiles graphs are then presented. LMSchartmaker Pro user can find Q Tests for Fit Graph window for this model, which shows M curve is badly fitted. 5. Change edf of M to 6 and click Fit. Click Window|Customised to re-arrange the graphs of L, M, S and Centiles in one screen. Click Graph|Data Plot to download the graph and move it to the left side of S Graph. Double clicking the Centiles Graph window you can see the current centiles in black and previous ones in blue. The change of the deviance is -53.4. Click here to see the results. Q Tests shows that the M curve is still not good. 6. To improve the model, click Rescale Age and click Fit. The deviance change is about -78.9. Double click Centiles Graph to remove the previous curves and double click M Graph to see the previous fitted M curve in blue. Double click Data Plot graph to overlap centiles on the raw data points. Click here for the graphs. The Q Tests shows an

1997-2011 Medical Research Council, UK

25

User's Guide to LMSchartmaker


improvement on M curve. 7. To improve M curve further change edf of M from 6 to be 7 and click Fit. The change of deviance between the current model and previous is -18.6. Click Graph|Z Scores to view Z Scores graph. Click here to see the graphs. The Q Tests shows that the Q statistic of M is within the range of -2 to +2 as those of L and S. See the guide for choosing edf values and chooseing the most suitable deviance measure.

8.3

Open Data in Free Format


Click File|Open to open example_free_format.txt where column 1 for age and 2 for weight. LMSchartmaker Light allows to enter age and measurement only. LMSchartmaker Pro allows for two extra columns of weighting (option) and selector(option).

1997-2011 Medical Research Council, UK

Example of Free Format with LMSchartmaker Light

26

8.4

Display Data
Once data have entered LMSchartmaker displays Data window and Data Plot. The Goto, PgU, PgDn and Home buttons in the Data Window allows you to display the data at different location. Data summary is available by click Summary. Click here for details of data display. Click Rename to load the Rename dialog box.

8.5

Rename Measure to Weight


After clicking Rename button in Data Window the Rename dialog box is loaded. Type Weight to rename Measure and click OK.

1997-2011 Medical Research Council, UK

27

User's Guide to LMSchartmaker

8.6

Model of Weight (030503o)


Click menu Model and then click Fit in the loaded Model dialog box to fit a model with the default edf of 3, 5, 3 and original age scale. Model (030503o), where 030503 presents the model with edf 3, 5, 3 for L, M, S and o for original age scale.

8.7

Q Tests for Fit Weight (030503o)


The Q Tests for Fit Weight (030503o) is given by LMSchartmaker Pro, which shows that M is not fitted well.

Note Q Tests for Fit is not available in LMSchartmaker Light.

1997-2011 Medical Research Council, UK

Example of Free Format with LMSchartmaker Light

28

8.8

Model of Weight (030603o)


Increase edf of M to 6 and click Fit. Click Window|Customised to re-arrange the graphs of L, M, S and Centiles in one screen. Click Graph|Data Plot to download the graph and move it to the left side of S Graph. Double clicking the Centiles Graph window you can see the current centiles in black and previous ones in blue. The change of the deviance is -53.4.

8.9

Q Tests for Fit Weight (030603o)


The Q Tests for Fit Weight (030603o) is given by LMSchartmaker Pro, which shows that M is fitted better but can be improved.

Note Q Tests for Fit is not available in LMSchartmaker Light

1997-2011 Medical Research Council, UK

29

User's Guide to LMSchartmaker

8.10

Model of Weight (030603r)


To improve the model, click Rescale Age and click Fit. The deviance change is about -78.9. Double click Centiles Graph to remove the previous curves and double click M Graph to see the previous fitted M curve in blue. Double click Data Plot graph to overlap centiles on the raw data points.

8.11

Q Tests for Fit Weight (030603r)


Q tests shows that M is improved.

Note Q Tests for Fit is not available in LMSchartmaker Light.

1997-2011 Medical Research Council, UK

Example of Free Format with LMSchartmaker Light

30

8.12

Model of Weight (030703r)


To improve M curve further change edf of M from 6 to be 7 and click Fit. The change of deviance between the current model and previous is -18.6. Click Graph|Z Scores to view Z Scores graph.

8.13

Q Tests for Fit Weight (030703r)


The Q Tests shows that the Q statistic of M is within the range of -2 to +2 as those of L and S.

Note Q Tests for Fit is not available in LMSchartmaker Light.

1997-2011 Medical Research Council, UK

31

User's Guide to LMSchartmaker

9
9.1

Example of Fixed Width with LMSchartmaker Pro


Example of Fixed Width
The example_fixed_width.txt is text file containing six variables with fixed width. They are age (year), weight (kg), height (cm), body mass index (BMI) (kg/m2), group and weighting. There are 1073 records in total. Weight is selected to be fit in the example. The location of each variable is at: Variable age weight height BMI group weighting Location 1-5 6-9 10-14 15-19 20-20 21-24 Decimals 2 1 1 2 0 2

9.2

Fit Model Step by Step


Given in this section is the introduction of how to open a fixed format text file, select model parameters, fit and test the model. Data file, example_fixed_width.txt, is used for illustration with LMSchartmaker Pro. 1. Click File|Open, an Open dialog box is loaded with the Files of type being text file by default. Click the file example_fixed_width.txt and then click Open. 2. View the data in the Preview box and click Fixed Width in the Data Type dialog box. The number at the bottom of the Preview can help you to locate the start and end position for age, BMI, weighting and selector. Specify location of these in the Start and End box and click OK to open the data. 3. Click Rename in the Data window and type BMI in the Measure box in the loaded Rename dialog box to replace Measure, then click OK. Now the title Measure is changed to be BMI in both Data window and Data Graph window. 4. Click menu Model and then click Fit in the loaded Model dialog box to fit a model with the default edf of 3, 5, 3 and original age scale. Click Window|Customised to re-arrange the L, M, S and Centiles and Q Tests graphs. Click Graph|Data Plot to download the Data Graph and double click on it to overlap the fitted centiles onto the raw data points. The results show that the model does not fit well (too flat) at the early ages. 5. Click Transformed Age in the Model dialog box. Remove 0 in the Power box and type 0.5 and click Fit. Close the Data Plot window by click the Close button on the top-right corner. Double click the Centiles Graph you can see that the current curves (in black) are better than previous ones (in blue). Q Tests indicate that the M curve still needs improvement. 6. Fit models by increasing edf of M one by one until 8. Double click Centiles Graph to remove the previous centiles. Double click M Graph to see both current and previous fitted M curves. Click here to see the graphs of L, M, S, Q Tests and Centiles. Q Tests for Fit Graph shows the improvement for M. You may try increasing edf of M to 9 and find that this brings a wiggle M curve without improve the goodness of fit. 7. You can try using different value of power a little by a little. For example, change to 0.3 for the power and click Fit. There is a little difference on mean curves at age 1 but no obvious improvement on Q Tests. Click here for the results. You may try to increase edf for S and then for L and find that there is no obvious improvement in goodness of fit. See the guide for choosing edf values and chooseing the most suitable deviance measure.

9.3

Open Data for Fixed Width


Click File|Open to open example_fixed_width.txt. In the loaded Data Type dialog box select Fixed Width. LMSchartmaker Pro allows to enter age, measurement, weighting (option) and selector (option). The number at the bottom of the Preview can help you to locate the start and end position for age, BMI, weighting and group. Specify location of these in the Start and End box and click OK to open the data.

1997-2011 Medical Research Council, UK

Example of Fixed Width with LMSchartmaker Pro

32

Note LMSchartmaker Light provides the same summary except weighting and selector.

9.4

Rename Measure to BMI


Click Rename button in Data Window the Rename dialog box is loaded. Type Weight to rename Measure and click OK.

1997-2011 Medical Research Council, UK

33

User's Guide to LMSchartmaker

9.5

Display Data
Now the title Measure is changed to be BMI in both Data Window and Data Plot window.

Note LMSchartmaker Light provides the same summary except weighting and selector.

9.6

Model of BMI (030503o)


Click menu Model and then click Fit in the loaded Model dialog box to fit a model with the default edf of 3, 5, 3 and original age scale. The model is simply denoted as BMI (030503o), where 030503 presents the edf for L, M and S, o for original age. Click Window|Customised to re-arrange the L, M, S and Centiles and Q Tests graphs. Click Graph|Data Plot to download the Data Graph and double click on it to overlap the fitted centiles onto the raw data points. The results show that the model does not fit well (too flat) at the early ages.

1997-2011 Medical Research Council, UK

Example of Fixed Width with LMSchartmaker Pro

34

9.7

Model of BMI (030503t, 0.5,0)


Click Transformed Age in the Model dialog box. Remove 0 in the Power box and type 0.5 and click Fit. The model is denoted as BMI (030505t, 0.5,0), where 030503 presents the edf for L, M and S, t for transform of age, 0.5 for the power and 0 for offset. Close the Data Plot window by click the Close button on the top-right corner. Double click the Centiles Graph you can see that the current curves (in black) are better than previous ones (in blue). Q Tests indicate that the M curve still needs improvement.

1997-2011 Medical Research Council, UK

35

User's Guide to LMSchartmaker

1997-2011 Medical Research Council, UK

Example of Fixed Width with LMSchartmaker Pro

36

9.8

Model of BMI (030803t, 0.5,0)


Fit models by increasing edf of M one by one until 8. Double click Centiles Graph to remove the previous centiles. Double click M Graph to see both current and previous fitted M curves. Q Tests for Fit Graph shows the improvement of M. You may try increasing edf of M to 9 and find that this brings a wiggle M curve without improve the goodness of fit.

1997-2011 Medical Research Council, UK

37

User's Guide to LMSchartmaker

9.9

Model of BMI (030803t, 0.3,0)


You can try different value for power a little by a little. For example, change to 0.3 for the power and click Fit. There is a little difference on mean curves at age 1 but no obvious improvement on Q Tests.

10
10.1

Preferences
Summary
Edit|Preferences allows you to set preferences for: Centiles to specify the number and SD spacing of centiles. For details click here. Limits to set the values of inner cycles, outer cycles, inner tolerance, outer tolerance and edf tolerance. For more information, click here. Weighting provides a choice of using sample weights. Click here for more information. Register to show register status or to upgrade LMSchartmaker Light to Pro. Click here for details.

10.2

Centiles
The centiles can be specified in two ways: either equally spaced on the Z score scale, or as a defined set of centiles. The default setting is 7 centiles equally spaced two-thirds of a Z score apart. The common set of 7 centiles, 3rd, 10th, 25th, 50th, 75th, 90th and 97th, is also preset. The centiles appear in the Centiles graph, and optionally in the Data and Z Scores graphs, and can be exported by File|Export. To change the centiles click on Edit|Preferences|Centiles: To specify equal spacing on the Z score scale click the button Centiles with equal SD spacing. Then enter the required number of centiles and their spacing. For example type 7 for the Number of centiles and 0.6667 for the Space between centiles to specify seven centiles spaced 0.6667 SD apart. See below for the Select Centiles dialog box. To specify unequally spaced centiles click the button Centiles with unequal SD spacing. Then list the required centiles in the cells under Centile. For example type 3, 10, 25, 50, 75, 90, 97 to obtain the centiles. To find out the Z scores corresponding to the centiles click in the Centile cell. See below for the Select Centiles dialog box. Note

1997-2011 Medical Research Council, UK

Preferences
The defined centiles remain the default until you change them.

38

Select centiles for unequal SD spacing

10.3

Limits
In addition the fitting process involves two nested iterations, and the user can adjust the parameters governing the iterative process. However there is little point changing them unless you are very sure you know what you are doing. Clicking on Edit|Preferences|Limits brings up the Limits dialog box, which allows you to change the following parameters for model fitting: Inner cycles the number of inner iterations is set to be 10 as default. Outer cycles the number of outer iterations is set to be 20 as default. Inner tolerance the criterion for inner convergence, 0.001 is default. Outer tolerance the criterion for outer convergence, 0.01 is default. edf tolerance the criterion for fitting edf, 0.05 is default.

1997-2011 Medical Research Council, UK

39

User's Guide to LMSchartmaker


The button Reset allows you to reset the parameters as default values as above. Note The reference defined will be kept in the LMSchartmaker until you re-define again.

10.4

Weighting
LMSchartmaker Pro can take account of sample weights, in model fitting. Usually all data points are of equal importance, but in complex survey designs data points can have different probabilities of being selected, indicated by their sample weight. A larger sample weight (not to be confused with body weight) indicates greater importance. A correct analysis needs to take the sample weights into account. If sample weights are not specified, weights of '1' are used for all the data. LMSchartmaker Light also uses equal weights throughout. Clicking on Edit|Preferences|Weighting brings the Weighting dialog box. There are three options: Scale sample weights to sum to sample size (default) Leave sample weights unscaled Ignore sample weights Note Zero or negative sample weights are ignored when fitting the model.

Weighting dialog box

10.5

Register
Clicking Edit|Preference|Register shows register status in LMSchartmaker Pro and brings up the Register and Upgrade dialog box in LMSchartmaker Light: a Register Status dialog shows the registered user name and registered ID in LMSchartmaker Pro. a Register and Upgrade dialog allows you to buy a key code on internet and upgrade and register to LMSchartmaker Pro with name and key code. Note LMSchartmaker Pro can not be converted to LMSchartmaker Light.

1997-2011 Medical Research Council, UK

Preferences

40

11
11.1

Glossary of terms
Missing Values
Negative values for measures, and weighting or selector if inclusive.

11.2

Power and Offset


In LMSchartmaker, power transform = (age + offset)^power, the power is a value between -3 and 3. If power is equal to zero it is a log transform. If power is equal to zero or a reciprocal of an even value then (age+offset) must be positive.

11.3

Default Name
By default, the name of a system file (*.LMS or *.lms) is given by the name of the data file followed by the values of edf. For example, test_030505o.lms, where each two digits of 030505 present the edf for L, M and S curves correspondingly and the character of o following denotes original age scale while the r and t for rescaled and transformed age option if you selected.

11.4

edf
edf (e.d.f.) stands for 'equivalent degrees of freedom'. The edf of each L, M and S curve is a measure of its complexity. 0 edf indicates a fixed constant whose value is specified in the box, e.g. L = 1 forces a normal distribution 1 edf relates to a constant 2 edf corresponds to a straight line 3 edf gives a simple curve like a quadratic 4 or more edf indicates progressively more complex curve shapes

1997-2011 Medical Research Council, UK

41

User's Guide to LMSchartmaker

12
12.1

Glossary of Statistics
Deviance
Five types of deviance measure are available for checking the goodness of fit: Penalized deviance, P.Deviance = -2 x penalized log likelihood Schwarz Bayesian Criterion, SBC = G.Deviance + edf_total x log(n) Generalised Akaike Information Criterion, GAIC(3) = G.Deviance + edf_total x 3 Akaike Information Criterion, AIC = G.Deviance + edf_total x 2 Global deviance, G.Deviance = -2 x global log likelihood where edf_total is the sum of the edf for L, M and S, and n is the sample size.

12.2

Z scores
The Z score of a child's measurement y is calculated from the L, M and S curves, using values appropriate for the child's age and sex. Two formulae are relevant depending on the value of L:

Z =

(y / M )L -1 , LS

if L 0

Z =

log( y / M ) , S

if L = 0

If the model is adequate the Z scores are approximately Normally distributed, with mean 0, standard deviation 1 and no skewness. If the value of L is 1, the original data are Normally distributed and the conventional Z score formula applies:

Z =

y-M M S

where M S is the standard deviation.

12.3

Q Tests
LMSchartmaker Pro provides the graph of Q Tests for Fit, which shows the adequacy of the edf for the L, M and S curves by testing whether the Z-scores are normally distributed independent of age. The procedures involved are as follows: The age range is divided into G contiguous groups of approximately equal size. We consider G over a range of values. The Range of G is depending on the sample size n such that max{ n 0 . 25 , max( edf L , edf M , edf S ) + 3} < G < min{ n 0 . 4 , n / 50 } , n > 50 which ensures that v = G - edf > 3 and size of each group g . Calculate Chi statistic of location, scale, skewness and kurtosis for M, S, L and kurtosis for each number of G. Transform the above Chi statistic values to Q statistic. Plot the obtained Q statistic values against corresponding degrees of freedom n, which are expected to be between 1.96 and 1.96 of 95% confidence interval. See Pan and Tim for the details of Q Tests procedures applied in LMSchartmaker. Note LMS method does not compensate for kurtosis.

12.4

Chi Statistic for Q Tests


Chi statistic for Q Tests To test whether the Z-scores are normally distributed independent of age, the Q Tests described by Royston and Wright test for non-random between-group variation in the first four estimated moments of the Z-scores.

edf S Suppose the age range is divided into G contiguous groups of approximately equal size. Let edf M , and edf L
denote the e.d.f. of the fitted M, S and L curves respectively, n denote the total sample size,

ng

th the size of the g group,

1997-2011 Medical Research Council, UK

Glossary of Statistics
v d2 u and g the group mean and variance, and g and g the group normal equivalent deviates for skewness and kurtosis calculated as described by D'Agostino et al. They are as follows:
zg
Location:

42

H 0 : z g = 0 g = 1,2,...,G,
G

QM =

n g z g2
g =1

2 which has a c distribution on v M = G - edf M

degrees of freedom.

Scale:
2 H 0 : d g = 1, g = 1, 2,..., G ,

2/3 2 d g - 1 9( n g - 1) G QS = 2 g =1 9( n g - 1)
v S = G - ( edf
Skewness:

which uses the Wilson-Hilferty transformation to normalise


S

2 dg

2 and is approximately c distributed on

+ 1) / 2

degrees of freedom.

H 0 : u g ~ N ( 0 ,1), g = 1,2,..., G ,
G 2 QL = u g g =1
2 v = G - edf which has a c distribution on L

degrees of freedom.

Kurtosis:

H 0 : v g ~ N ( 0 ,1), g = 1,2,..., G ,
G 2 QK = v g g =1
2 which has a c distribution on v K = G degrees of freedom.

12.5

Q Statistic for Q Tests


The Chi statistic Q values of L, M, S and Kurtosis for each number of group G are c distributed under the null hypothesis. Each Q statistic is then transformed to Normality using the Wilson-Hilferty transformation and plotted as the Studentised residual:
1
2

ZQ

2 Q 3 - 1 - v 9v = 2 9v

Note The Q statistic in Q Tests graph refers to its Studentised residual.

1997-2011 Medical Research Council, UK

43

User's Guide to LMSchartmaker

12.6

Detrended Q-Q Plot


Detrended Q-Q Plot is a detrended form of Q-Q plot. Q-Q plot is often used to assess whether data follow a particular distribution, e.g. for the Normality of the data after conversion to Z scores. The Z scores (observed quantile) are sorted into increasing order, and then each is plotted against its expected Z score (expected quantile), based on its centile position assuming a Normal distribution. It is more sensitive to subtle deviations in its detrended form, which displays the difference between the observed and expected quantile (vertical axis) against the observed quantile (horizontal axis). The points appear as a worm shape, where the extreme points are more variable than those in the centre. A few points at the ends may not lie on along the zero line, which is a sign of mild skewness or kurtosis and can be ignored. 95% confidence interval is calculated and displayed for a given quantile with associated and the sample size. van Buuren and Fredriks highlight various possible patterns in the plot: a positive (negative) offset shows the fitted mean is too small (large); a positive (negative) slope indicates that the fitted variance is too small (large); an (inverted) U-shape indicates skewness to the left (right) in the fitted distribution, an S-shape bent down (up) on the left shows platykurtosis (leptokurtosis) in the fitted distribution. If the plot is out of the 95% confidence interval, this is a sign that the model fits poorly. A quadratic (banana-shaped) curve indicates the presence of skewness, while a cubic (S-shaped) curve indicates kurtosis. Skewness can be reduced by increasing the edf values for one or more of the L, M and S curves. Kurtosis, which is less common, usually cannot be reduced in the same way. Note The Detrended Q-Q Plot is based on the whole age range and is available in LMSchartmaker Pro. Detrended Q-Q Plot in age groups are more useful but not available in the current version.

13
13.1

Acknowledgement
Acknowledgement
Peter Green, for development of the original program. Tam Fry of the Child Growth Foundation for financial support. Harvey Goldstein for encouragement.

14
14.1

Statistical References
References
LMS method Cole, T. J. and Green, P. J. 'Smoothing reference centile curves: The LMS method and penalized likelihood', Statistics in Medicine, 11, 1305-1319 (1992). Cole, T. J., Freeman, J. V. and Preece, M. A. 'British 1990 growth reference centiles for weight, height, body mass index and head circumference fitted by maximum penalized likelihood', Statistics in Medicine, 17, 407-429 (1998). Freeman, J. V., Cole, T. J., Chinn, S., Jones, P. R. M., White, E. M. and Preece, M. A. 'Cross sectional stature and weight reference curves for the UK, 1990', Archives of Disease in Childhood, 73, 17-24 (1995) Q test D'Agostino, R. B., Belanger, A. and D'Agostino, Jr. R. B. 'A suggestion for using powerful and informative tests of normality', The American Statistician, Vol 44, 316-321 (1990). Royston, P. and Wright, E M. 'Goodness-of-fit statistics for age-specific reference intervals', Statistics in Medicine, 19, 2943-2962 (2000). Wilson, E. B. and Hilferty, M. M. 'The distribution of chi-square', Proceedings of the National Academy of Sciences, Washington, 17, 684-688 (1931). Pan, H. & Cole, T. J. 'A comparison of goodness of fit tests for age-related reference ranges', Statistics in Medicine, 23, 1749-1765 ( 2004) Detrended Q-Q plot van Buuren, S. and Fredriks, M. 'Worm plot: a simple diagnostic device for modeling growth reference curves', Statistics in Medicine, 20, 1259-1277 (2001).

1997-2011 Medical Research Council, UK

Window Stacked and Customised

44

15

Window Stacked and Customised


The layout of open windows is controlled by these options, though they are rarely needed as the graph windows are by default neatly stacked as they appear. At the foot of the Window menu is a list of open windows, and selecting individual windows brings them to the front. There are three options for window display: Stacked as default, the Data and Model windows are at the left side of the screen and the open graph windows are arranged stacked at the right side. If all the graph windows are open they are stacked as Data Plot, Z scores, Detrended Q-Q Plot, Q Tests, L, M, S and Centiles on the top. Customised this option allows you to view graph windows without overlapping. By default, LMSchartmaker Light displays graphs of L, M, S and Centiles, and LMSchartmaker Pro includes the Q Tests window. You can customise the window display and then this option shows your chosen layout. Customise allows you either to Revert to Default i.e. revert to the default customised layout, or else Save Current which saves your current window positions as a new customised layout.

1997-2011 Medical Research Council, UK

Vous aimerez peut-être aussi