Home
A user's guide - University of Bristol
Contents
1. pesi 52090 mest 528907 ager 52890 occasioni 52890 personi 54890 femui 52890 occupationi 5289 39 591 31 803 4 000 SAGESOr 1 000 1 000 2 000 38 611 dd 069 7 000 VAGESOr 1 000 1 000 2 000 39 928 51 031 10 416 TAGESOr 1 000 1 000 2 000 21 910 53 494 13 648 OAGESOr 1 000 1 000 2 000 25 657 40 592 16 620 MAGESOr 1 000 1 000 2 000 MISSING MISSING MISSING KAGESOr 1 000 1 000 2 000 29 311 26 862 6 000 sAGES r 2 000 1 000 3 000 22 690 30 735 10 000 VAGESOr 2 000 1 000 3 000 24 199 35 460 12 133 TAGESOr 2 000 1 000 3 000 21 405 59 795 15 659 GAGESOr 2 000 1 000 3 000 17 220 52 914 17 565 MAGESOr 2 000 1 000 3 000 22 994 20 179 20 953 KAGESOr 2 000 1 000 3 000 CO oa on S oo EJ eee fe RI oo co The data are now in the required form for analysis with one row per measurement occasion It would now be a good idea to save the worksheet using a different name e g function long wsz Initial data exploration Before we start to do any modelling we should first carry out some exploratory analysis We will begin by looking at the mean of our outcome variable functioning score at each occasion m From the Basic Statistics menu select Tabulate sli Tabulate ita ioj x Display Output Mode f Counts C Means Percentages of row totals Percentages of column totals Percentages of the grand total O Chi Squared Store in Columns id id m Rowse fig m Where values in m are betw
2. 2 0 093 0 017 age 1 occupation 3 Boj 53 130 0 131 tu tes Biy 9 150 0 012 i 2 By 9 004 0 001 tz 0 076 0 004 0 001 0 000 0 000 0 000 lu ug 32 006 0 693 up TNO Q Q 0 907 0 049 0 105 0 007 4 eni N O Q o 25 809 0 308 e 0 061 0 030 0 005 0 004 lij 2 loglikelihood IGLS Deviance 277997 954 41958 of 52890 cases in use Add Term Estimates The reduction in the likelihood statistic is only 2 with 2 degrees of freedom We therefore conclude that the interactions with the age sguared term are not needed The estimate of the average decline in physical functioning by age in the top employment grade is 0 150 For the low employment grade it is 0 150 0 093 lt 0 243 We can plot the predicted average growth curve for each grade as follows m From the Model menu select Customised Predictions Click on age then Change Range Click Range Next to Upper Bound type 25 Next to Lower type 10 Next to Increment type 1 This will produce predictions for ages 40 to 75 years because age was centred about 50 Click Done Click on occupation then Change Range Check category then each of occupation 1 occupation 2 and occupation 3 Click Done Click Fill Grid Click on the Predictions tab The grid contains a row for every combination of occupation grade and age for each year in the range 10 to 25 Click Predict to compute the predictions ignore the messag
3. KAGE50 Before proceeding check carefully that the Split records window looks like this si Split records Dimensions Number of occasions E Humber of variables 3 l Stack data Repesticarried data Input columns Free columns same a input split Generate indicator column Hep Clicking on the column headings allows you to set all six occasion variables from a single pick list The first variable on the list is assigned to occasion 1 the second to occasion 2 and so on This works fine in our case because the variables appear on the list in the correct order If this is not the case you can specifically assign variables to occasions by clicking on individual cells in the grid Click in turn on the three empty cells in the Stacked into row of the Stack data grid You may need to enlarge the window to see the whole grid From the drop down lists that appear select c22 c23 and c24 respectively Tick the Generate indicator column check box a In the neighbouring drop down list select c25 That deals with occasion specific data Now we will specify the repeated data In the Repeat carried data frame select the three variables ID FEMALE GRADE as the input columns and c26 c27 and c28 as the output columns The completed set of entries should look like this si Split records Dimensions Number of occasions E Humber of variables 3 Stack data Occasion 4 Stacked ito Repeati carried dat
4. code Set the missing value code to 20 Click the Apply button then Done The Names window is updated and now explicitly shows the number of missing cases for each variable st Names Neli afk a 1 11 14 6 407695 F1 57574 2 97561 69 64911 8 15 11 80435 FO 3EFA6 4 231273 2 92652 5 206024 19 23751 8 409927 69 6278 2 458883 1 2 98643 1 828125 2 1 40625 9 355224 69 81925 2 383819 3 94762 0 4668045 24 08076 9 969062 1 85617 2 536131 f5 2 1274 0 3046875 26 7343 7 425531 70 09693 T T 16543 T3 8034 0 O 0 This arrangement of the data in which each row of a rectangular array corresponds to a different individual and contains all the data for that individual is a natural one but it does not reflect the hierarchical structure of measurements nested within individuals For a multilevel analysis the data must first be restructured so that there is one record per measurement occasion level 1 unit The Split records window shown below accessed via the Data Manipulation menu is designed to transform an individual s data record into separate records or rows One for each occasion In the present case we shall produce six records per person that is 52890 records altogether The ordering of people will be preserved and they will become the level 2 units a Split records Dimensions Humber of occasions 1 Stack data Occazioni 1 Stacked into Repesti carried data Input columns Output
5. columns oC FEMALE ka GRADE same as input Generate indicator column Help There are two types of data to consider occasion specific data and individual time invariant specific data The former in principle changes from occasion to occasion in this case the functioning scores and the ages The latter remain constant from occasion to occasion in this case the person identifiers gender and employment grade First let us deal with the occasion specific data Open the Split records window a Set the Number of occasions to 6 Set the Number of variables to 3 Doing this produces si Split records Dimensions Number of occasions G Stack data Repeaticarried data Input Columns o ne 2 FEMALE ka j GRADE Same az input Split Generate indicator column Pw We need to stack the six physical functioning scores into a single column the six mental health functioning scores into a single column and the six ages into a single column In the Stack data grid click on Variable 1 From the drop down list that appears select the six variables XPCS VPCS TPCS OPCS MPCS KPCS and then click Done To make multiple selections hold the control key down while clicking on variable names Repeat the above two steps for Variable 2 and the six variables XMCS VMCS TMCS OMCS MMCS KMCS a Repeat the above two steps for Variable 3 and the six variables XAGE50 VAGE50 TAGE50 QAGE50 MAGE50
6. 07 0 235 0ccupation 3 0 067 0 018 age 1 occupation 2 0 001 0 001 age 2 occupation 2 0 1 10 0 025 age 1 occupation 3 0 001 0 002 age 2 occupation 3 Boy 53 161 0 133 xo ten Bry 0 138 0 015 x lj te lij Bz 0 005 0 001 x 32 010 0 693 NO Q Q 0 908 0 049 0 104 0 007 0 076 0 004 0 001 0 000 0 000 0 000 u Oj lid 2 Eol N O o Q 25 810 0 308 0 061 0 030 0 005 0 004 lij 2 loglikelihood IGLS Deviance 277996 181 41958 of 52890 cases in use Add Term Estimates Clear Notation Responses Store Help Zoom 100 v The reduction in the likelihood statistic is 33 with 4 degrees of freedom four additional parameters so there is strong evidence that the growth rate differs by employment grade However the interactions with the guadratic age terms appear not to be significant based on a comparison of the coefficients with their standard errors We will therefore see if we can simplify the model by removing these terms sa In the Equations window click on any of the four interaction terms followed by Modify Term n Next to poly degree change from 2 to 1 Click Done Variables age 2 occupation 2 and age 2 occupation 3 will be removed from the model m Click More to fit the model Equations pes N XB O pes Bo cons B age l B age 2 2 001 0 164 fem 0 670 0 160 occupation_2 2 258 0 229 occupation_3 0 051 0 013 age l occupation
7. Modelling Repeated Measures on Physical Health Functioning in MLwiN enny Head Department of Epidemiology and Public Health University College London introduction In this practical we will analyse longitudinal data on health functioning from a study of civil servants the Whitehall Il study Health functioning was assessed by the SF 36 a 36 item instrument that comprises eight subscales covering physical psychological and social functioning These eight scales can be summarised into physical and mental health components These are scaled using general US population norms to have mean values of 50 and low scores imply poor functioning Physical health functioning PCS and mental health functioning MCS were measured on up to six occasions at approximately 2 5 year intervals In this practical PCS is the response and there are two levels of data person level 2 and measurement occasion level 1 In addition there are three explanatory variables The first is the person s age which varies from occasion to occasion and is therefore a level one variable The other two are gender coded 0 for males and 1 for females and employment grade at baseline coded 1 for high grade 2 for intermediate grade and 3 for low grade These vary from person to person and are thus level two variables In this session we will explore the following questions 1 How does physical functioning change as people get older 2 Does this vary from person to per
8. a Input columns Output columns Free columns same a input Split iw Generate indicator column 025 v Help This will take the six physical functioning scores each of length 8815 and stack them into a single variable in c22 The six mental health functioning scores will be stacked into 23 and the six age variables will be stacked into c24 Each id code will be repeated six times and the repeated codes are stored in c26 Similarly values of FEMALE and GRADE will be repeated six times and stored in c27 and c28 The indicator column which is output to c25 will contain occasion identifiers for the new long data set Click the Split button to execute the changes You will be asked if you want to save the worksheet select No The Names window now shows the following for c22 through c28 st Names Sele Edit name Data Toggle Categorical Categories Description Paste Delete F Used columns ete Tex Ta Imen Te Te Teng categorical description C22 gem 10932 6 407695 1 85617 False C23 52890 10932 2 383819 75 21274 False C24 52890 rali 11 26 73438 False C25 57690 0 6 True 57690 8815 False 52890 1 False 52890 False False False In the Names window use Edit name to assign the names pcs mcs age occasion person fem and occupation to c22 c28 Viewing columns 22 28 by selecting the View or edit data from the Data Manipulation menu will now show aW Data ud EX goto line h view Help Font W Show value labels
9. e about a ve definite covariance matrix Click on Plot Grid Next to x check age pred Under Grouped by check occupation pred Click Apply The predicted average growth curve for each occupation grade is plotted Note that the gender dummy fem has been fixed at its sample mean of 0 31 which for a 0 1 variable is egual to the proportion in category 1 We could have fixed this at 0 or 1 to obtain the curves for one gender st Graph display Sel x occupation mean pred l occupation z oecupafion 5 age pred
10. een Ee BB Select Means as the Output Mode A drop down list labelled variate column appears Select pes s From the Columns drop down list select occasion Click Tabulate This produces the output Variable tabulated is pcs 1 2 3 4 5 6 TOTALS N 8292 1482 6805 6465 6469 6445 41958 MEANS a PRO 50 6 OU 9 S020 48 7 48 8 OO SD S Gas 8 40 G16 8 74 T90 DeL 8 43 Now use the Tabulate window to tabulate mean age by occasion Variable tabulated is age 5 6 TOTALS 6798 6922 49633 LLa 14 1 6465 6 00 smelo 04 The age variable has been transformed by measuring it as a deviation from age 50 We are now almost in a position to set up a simple model but first we must define a constant column this is just a column of 52890 values of 1 one for each measurement occasion m From the Data Manipulation menu select Generate Vector Fill out the options as shown below and click Generate Use the Names window to assign the name cons to c29 Seis f Constant vector Sequence Repeated Sequence Type of vector Output column Number of copies Help Random numbers A simple variance components model We will start by examining how the total variance is partitioned into two components between person level 2 and between occasions within person level 1 This variance components model is not interesting in itself but it provides a baseline with which to compare more complex models Set up a two level mode
11. es Poc ons E 0 244 0 005 age Pos 51 671 0 080 x by e V ig TNO Qu Q5 39 203 0 711 e TNO Qe Qe 31 597 0 245 J 2 foelirelihood GL5 Deviance 280335 095 41958 of 52890 cases in use Name add Term Estimates nlinear Clear Notation Responses Store Zoom 100 The estimate of the fixed parameter for age is 0 244 indicating that physical functioning declines with increasing age Estimates of the random parameters are somewhat reduced more so the level 1 variance which is expected because age is time varying i e a level 1 variable There is a reduction in the likelihood statistic which is now 280335 We would expect the linear growth rate to vary from person to person around its mean value rather than be fixed and so we make the coefficient of age random at level 2 and continue iterations until convergence to give s Equations pes N XE Q pes B0 0ns Bijase Box 51 743 0 073 x ni E fy 0 246 0 006 x Lj i j iti oj D porno te 0 346 0 040 di e al NO ON O 28 585 0 243 2 oelikelihood GLa Deviance 279215 799 41958 of 52890 cases in use Add Term Estimates Clear Notation Responses Store Zoom 100 v Note that the coefficient for age now has a subscript j indicating that it varies at level 2 i e between individuals The deviance that is the reduction in the likelihood statistic is 280335 279216 1119 this is large and
12. is clearly statistically highly significant comparing to a chi sguared distribution on 2 degrees of freedom Hence there is considerable variation between people in their linear growth rates We can get some idea of the size of this variation by taking the square root of the slope variance o to give the estimated standard deviation v0 09 0 3 Assuming Normality about 95 of people will have growth rates within two standard deviations of the mean growth rate 0 246 giving a 95 coverage interval of 0 85 to 0 35 for the growth rate This suggests that physical health functioning improves with age for some people We can also look at various plots of the level 2 residuals To obtain a plot of the standardised level 2 residuals slope U versus intercept U From the Model menu select Residuals s Next to level at the bottom of the Residuals window select 2 person Click Calc Click on the Plots tab and under pairwise check standardised residuals Click Apply Graph display Sel 46 3 0 1 5 00 15 3 0 stcl cons We see from the above plot that the two level 2 residuals are positively correlated From the Estimates window we see that the model estimate is 0 21 from the Model menu select Estimate tables change from FIXED PART to level 2 person and check C A positive correlation implies that the greater the expected score at age 50 the faster the growth However this statistic needs t
13. is that the more complex level 2 variation which we have introduced in order to model non linear growth in individuals has absorbed some of the residual level 1 variation in the earlier model We can view this final model for the random variation as a convenient and reasonably parsimonious description of how the overall variance is partitioned between the levels We can use the Variance function window to calculate the variance at both level 1 and level 2 for each record in the dataset and these can be added to obtain the total predicted variance From the Model menu select Variance function Next to level at the bottom of the Variance function window select l occasion Next to variance output to select llvar Click Calc Now change level to 2 person Next to variance output to select I2var Click Calc From the Data Manipulation menu select Command interface In the box at the bottom of the Command interface window type calc c37 lt llvar 1 l12var Press return then type name c37 totvar We will now plot the level 1 variance level 2 variance and total variance against age From the Graphs menu select Customised Graph s At the top left of the window make sure that D1 is selected You should find that a plot of Ilvar versus age has already been specified If not select Ilvar for y age for x and select line for plot type By default the line will be plotted in blue Now click on the 2 row under ds Select I2va
14. l with pes physical functioning as the outcome variable and cons as the only explanatory variable The Eguations window should appear follows st Equations pes NE O pes Bp cons Boy Bo Ty TE oy E yl ANU O Q o ea TV 90 87 ok Add Term Estimates Nonlinear Clear Notation Responses Store Help Zoom 100 Note pcs is the physical functioning score at i measurement occasion for the j person At convergence the estimates are sU Equations pes MXE Q pes Bp cons Boy 50 133 0 075 tun ten ig TNO Qu Qu 40 631 0 738 ey TNO 29 OF 33 462 0 259 2 oolhrelinood iGls Deviance 282585 513 41958 of 52890 cases in use Name Add Term Honlinear Clear Notation Responses Store Zoom 100 There is variation in physical functioning between individuals 6 40 6 and also variation between occasions within person G2 33 5 The likelihood statistic 2 loglikelihood found at the bottom of the Equations window can be used as the basis for judging more elaborate models The baseline value is 282585 A linear growth curve model A first step in modelling the between occasion within person or level 1 variation is to fit a fixed linear trend We therefore add age to our list of fixed explanatory variables in the Eguations window using Add Term After adding age click on More and at convergence obtain the following sU Equations TEK pes N XE O p
15. nce function a guadratic function in age To see the eguation of the variance function and to obtain an estimate of it m From the Model menu select Variance function m Next to level at the bottom of the Variance function window select l occasion Click on Name to see the form of the level 1 variance function a guadratic function in age see below Next to variance output to select c36 Click Calc a In the Names window assign the name Ilvar to c36 From the Variance function window we see that the level 1 variance is the following function of the level 1 parameters whose estimates are obtained by running the model to convergence E 2 m 2 2 var e cons e ge G osons 2g cons age G age The following plot shows Ilvar versus age si Graph display SEE d Ca a s m TU gt E S Le T m z n o D O ne 14 5 Age centred at 50 years As a result of allowing the level 1 variance to depend on age there is a statistically significant decrease in the likelihood statistic of 279216 279070 lt 146 with 2 degrees of freedom We shall see later that some of this level 1 variation can be explained by further modelling of the level 2 variation Repeated measures modelling of non linear polynomial growth Growth in functioning may not be linear for all people over this age range One simple way of inducing non linearity is to add a quadratic term in age which is achieved by i
16. ncluding age squared as an additional explanatory variable in the model We can ask MLwiN to calculate age and add it to model as follows In the Equations window click on age then Modify Term Check polynomial then change poly degree from 1to 2 m Click Done and respond OK to the message that appears The predictor age has been replaced by age l and age 2 and variables with these names have also been added to the worksheet Fit random coefficients at level 2 to both age 1 and age 2 Fit a random coefficient at level 1 to age 1 Click Start to fit the model At convergence we have st Equations pes NAB O pes Bojcons Bagel Base Bu 51 780 0 074 x y t Eoy By 0 197 0 008 x tej Ba 0 004 0 001 Ho 34 097 0 726 N O 9 Q 9 959 0 050 0 105 0 007 ua 0 077 0 004 0 001 0 000 0 000 0 000 w N 0 Q Q 25 837 0 308 0 059 0 030 0 005 0 004 E lij 2 loeiikelihoodi PGLS Deviance 278522 965 41958 of 52890 cases in use Name Add Term Estimates line Clear Notation Responses Store Zoom 100 vx The likelihood statistic shows a further drop this time by 547 with 4 degrees of freedom one fixed parameter and three random parameters so there is strong evidence that a guadratic term which varies from person to person improves the model We also find that the parameter estimates in the level 1 variance covariance matrix have all decreased What has happened
17. o be interpreted with great caution it can vary according to the scale adopted and is relevant only for linear growth models Allowing the growth rate to vary across individuals by fitting a random coefficient at level 2 to age implies that the between individual level 2 variance depends on age To calculate level 2 variance function m From the Model menu select Variance function m Next to level at the bottom of the Variance function window select 2 person Click on Name to see the form of the level 2 variance function a quadratic function in age Next to variance output to select c35 Click Calc In the Names window assign the name l2var to c35 To plot the level 2 variance against age u From the Graphs menu select Customised Graph s At the top left of the window change from dataset D10 to an empty dataset D1 which has no graph settings m From the drop down list next to y select I2var From the drop down list next to x select age a From the drop down list next to plot type select line Click Apply The variance plot is shown below after adding axis labels We can see that the between individual variance in physical functioning increases with age si Graph display EX q O tu ru ie gt tu 5 T T SAL a a a CO 1 3 O O 3 14 5 Age centred at 50 years Complex level 1 variation Before going on to further elaborate the level 2 variation we can allow for com
18. plex that is non constant variation at level 1 So far we have allowed the between individual level 2 variance to depend on age which was achieved by fitting a random coefficient for age at level 2 Suppose we believe that the within individual level 1 variance might also depend on age For example we might expect greater variance in physical functioning over time for older people than for younger people We allow the level 1 variance to depend on age by declaring the coefficient of age to be random at level 1 s In the Equations window click on age and check i occasion Click Done You should find that an i subscript has been added to the coefficient for age and two extra terms have been added to the level 1 covariance matrix a Click More to fit the new model The model estimates are st Equations JER pes N XB O Pes Potons so f LijaSe Box 51 720 0 073 x Dj te Dij Bry 0 243 0 006 x l te ti Q 31 006 0 676 0 351 0 040 0 087 0 005 N O O os 26 067 0 304 0 136 0 028 0 007 0 004 E lij 2 oplirelihood GLS Deviance 279069 930 41958 of 52890 cases in use Add Term Estimates Clear Notation Responses Store Zoom 100 v Note that because age is a level 1 variable it does not make sense to say that the effect of age varies between measurement occasions Rather the parameters in the level 1 variance matrix should be thought of as coefficients of the level 1 varia
19. r for y age for x and select line for plot type Click on plot style and change the colour to green Now click on the 3 row under ds Click plot what Select totvar for y age for x and select line for plot type Click on plot style and change the colour to red Click Apply The plot below shows the estimated level 1 variance blue level 2 variance green and total variance red in physical functioning as functions of age While the level 1 variance is almost constant across the age range the level 2 variance and therefore the total variance increases with age s Graph display Seles V qo C CU pa CU gt ae D O Ks 14 5 21 8 24 0 Age centred at 50 years Adding person level explanatory variables We will now add employment grade occupation and gender fem to the model Before adding occupation to the model we need to declare it as a categorical variable so that MLwiN knows to create and add dummy variables The gender variable fem is already coded as a binary 0 1 variable so can be added in its current form In the Names window highlight occupation then click Toggle Categorical so that the entry in the categorical column changes to True Go to the Eguations window click Add Term Under variable select fem and click Done Click on Add Term again and select occupation Retain the default occupation 1 high grade as the reference category Click Done Click More to fit the model s Equation
20. s pes NOE O pes Bo coms Bagel G age 2 2 056 0 164 fem 0 825 0 157 occupation 2 2 566 0 222 0ccupation 3 Boy 53 280 0 127 tu 2 oy By 0 193 0 008 u e By 0 004 0 001 x 31 990 0 693 N 0 Q Q 9 905 0 049 O0 107 0 007 0 076 0 004 0 001 0 000 0 000 0 000 li Oj li aj w N o o lt 25 802 0 308 0 063 0 030 0 005 0 004 e lij 2 loglikelihood IGLS Deviance 278029 435 41958 of 52890 cases in use Add Term Estimates Clear Notation Responses Store Help Zoom 100 vi Both gender and employment grade are significantly associated with physical functioning Women and employees in lower grades have poorer physical functioning than men and high grade employees Note that the intercept now refers to the reference group i e men in high employment grade of age 50 Does growth differ by group cross level interaction between age and grade Does physical functioning decline faster in people from the low employment grades compared with those in the high employment grades We will add a cross level interaction between age and occupation to explore this In the Equations window click Add Term Change order to 1 and select age and occupation from the two drop down lists that appear under variable Click Done m Click More to fit the model s Equations pes N XB Q pes Gc c0ns B yage l G age 2 1 997 0 164 fem 0 725 0 167 occupation_2 2 3
21. son 3 Does physical functioning decline faster in people from low employment grades compared with those in high employment grades Setting up the data structure Open the worksheet function wsz which contains 21 variables for 8815 people as shown below in the Names display st Names Sele i Description Copy Paste Delete Help F Used columns categorical description False False False 14 False F1 57574 False 69 64911 False 15 False fO 377 16 False F2 92652 False 19 23751 False 69 6278 False T2 98643 False 21 40625 False 69 81925 False T3 94762 False 24 08076 False F1 85617 False 75 21274 False 26 73438 False 70 09693 False T3 8034 False False False False Talna 0 O O 0 0 0 O 0 O O 0 O 0 O 0 0 O 0 O 0 O O O 0 Column number 1 contains the person identifier Columns 2 and 3 contain person level explanatory variables gender FEMALE and employment grade GRADE This is followed by sets of three variables for the six measurement occasions age physical functioning and mental functioning at each occasion XAGE50 XPCS XMCS at measurement occasion 1 etc The variable names for measurement occasions 1 to 6 are prefixed by X V T 0 M and K respectively Note that the ages have been centred at age 50 In this data set 20 represents a missing value We can tell MLwiN that 20 is the missing value code by Select the Options menu Select Numbers Display precision and missing value
Download Pdf Manuals
Related Search
Related Contents
この報告書をダウンロードする Manhattan Edit Workshop FCP 100 SKD型アクチュエ一タ 取扱説明書 Structuration de l`espace Pacha [Mode de compatibilité] Fluke 700G Series Pressure Gauge Cooler Master Elite 370 Copyright © All rights reserved.
Failed to retrieve file