Mixed modeling - issues

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Mixed modeling - issues

Pluis
Dear all,

I'm trying to obtain slopes of kidney function of a group of 500 people. Per person, I have 0 up to 81 follow-up measurements of kidney function per patient. And all follow-up measurements have been at different times.
The dataset is organised as follows:

ID     Value   time_years
1       88          0
1       99          0.68
1       98          1.53
2       79          0
2       79          1.15
2       81          4.16
2       94          4.24
etc...

I have used this method to obtain the slopes (so change in kidney function per year per patient): http://www.tqmp.org/Content/vol09-2/p072/p072.pdf
However, I learned that as this is a form of linear regression analysis, this does not take in to account that follow-up time for every person is different or the varying number of follow-up moments.
For example, I've had output with someone declining 400% per year beacause I only had 2 measurements one month apart.
So I decided to use mixed modeling with OMS, but I can't get the model to worked with repeated measures.

Syntax:
SORT CASES BY ID(A).

SPLIT FILE LAYERED BY ID.

DATASET DECLARE CKD_EPI_SLOPES4.  

DATASET DECLARE  CKD_EPI_slopes_4.
OMS
  /SELECT TABLES
  /IF COMMANDS=['Mixed'] SUBTYPES=['Parameter Estimates' ' Tests of Fixed Effects']
  /DESTINATION FORMAT=SAV NUMBERED=TableNumber_
   OUTFILE='CKD_EPI_slopes_4'.


MIXED CKD_EPI WITH Follow_up_years
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0,
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=Follow_up_years | SSTYPE(3)
  /METHOD=REML
  /PRINT=SOLUTION
  /REPEATED=Follow_up_years | SUBJECT(ID) COVTYPE(UN).


OMSEND.
SPLIT FILE
OFF.

This syntax wil only work if I remove the /Repeated subcommand from mixed. otherwise I get the "insufficient memory to estimate the model parameters" error.
However, without the repeated subcommand the slopes are identical to the ones obtained with the first method (obviously).

- Is there a workaround for this problem?
- Am I doing the whole thing wrong? (I'm mostly self-taught in statistics, med school did not teach me properly and I apologize for rookie mistakes)

all advice is greatly appreciated!

best regards,
Elise (Dutch phd-student)
Reply | Threaded
Open this post in threaded view
|

Re: Mixed modeling - issues

Ryan
On the face of it, I'd say you would benefit from a random coefficient model via MIXED. Pls search archives. I would require more information to know whether this model is optimal.

Ryan

Sent from my iPhone

> On Sep 25, 2014, at 9:30 AM, Pluis <[hidden email]> wrote:
>
> Dear all,
>
> I'm trying to obtain slopes of kidney function of a group of 500 people. Per
> person, I have 0 up to 81 follow-up measurements of kidney function per
> patient. And all follow-up measurements have been at different times.
> The dataset is organised as follows:
>
> ID     Value   time_years
> 1       88          0
> 1       99          0.68
> 1       98          1.53
> 2       79          0
> 2       79          1.15
> 2       81          4.16
> 2       94          4.24
> etc...
>
> I have used this method to obtain the slopes (so change in kidney function
> per year per patient): http://www.tqmp.org/Content/vol09-2/p072/p072.pdf
> However, I learned that as this is a form of linear regression analysis,
> this does not take in to account that follow-up time for every person is
> different or the varying number of follow-up moments.
> For example, I've had output with someone declining 400% per year beacause I
> only had 2 measurements one month apart.
> So I decided to use mixed modeling with OMS, but I can't get the model to
> worked with repeated measures.
>
> Syntax:
> SORT CASES BY ID(A).
>
> SPLIT FILE LAYERED BY ID.
>
> DATASET DECLARE CKD_EPI_SLOPES4.  
>
> DATASET DECLARE  CKD_EPI_slopes_4.
> OMS
>  /SELECT TABLES
>  /IF COMMANDS=['Mixed'] SUBTYPES=['Parameter Estimates' ' Tests of Fixed
> Effects']
>  /DESTINATION FORMAT=SAV NUMBERED=TableNumber_
>   OUTFILE='CKD_EPI_slopes_4'.
>
>
> MIXED CKD_EPI WITH Follow_up_years
>  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1)
> SINGULAR(0.000000000001) HCONVERGE(0,
>    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
>  /FIXED=Follow_up_years | SSTYPE(3)
>  /METHOD=REML
>  /PRINT=SOLUTION
>  /REPEATED=Follow_up_years | SUBJECT(ID) COVTYPE(UN).
>
>
> OMSEND.
> SPLIT FILE
> OFF.
>
> This syntax wil only work if I remove the /Repeated subcommand from mixed.
> otherwise I get the "insufficient memory to estimate the model parameters"
> error.
> However, without the repeated subcommand the slopes are identical to the
> ones obtained with the first method (obviously).
>
> - Is there a workaround for this problem?
> - Am I doing the whole thing wrong? (I'm mostly self-taught in statistics,
> med school did not teach me properly and I apologize for rookie mistakes)
>
> all advice is greatly appreciated!
>
> best regards,
> Elise (Dutch phd-student)
>
>
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Mixed-modeling-issues-tp5727400.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Mixed modeling - issues

Andy W
In reply to this post by Pluis
I highly doubt you want to use SPLIT FILE before the MIXED command.
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: Mixed modeling - issues

Bruce Weaver
Administrator
Andy W wrote
I highly doubt you want to use SPLIT FILE before the MIXED command.
That SPLIT FILE is part of the advice the OP read in the Pfister et al article in TQMP.  The approach advocated there is one that some people call the "slopes as outcomes" method.  E.g., here is an excerpt from Hoffman & Rovine (2007) that uses that name for it:

<H&R 2007 excerpt>
A second alternative [for analyzing data with a quantitative repeated measures design factor] is a two-stage approach known as slopes as outcomes (see Lorch & Myers, 1990; Singer & Willett, 2003, pp. 28–44), in which regressions are performed separately for each person in the first step, and the individual regression estimates are then used as data in a between-subjects analysis (i.e., ANOVA or regression).  Although intuitively appealing, this method does not account for the differential reliability of the individual regression estimates, which can result in biases in unknown directions. Such two-stage procedures are also statistically inefficient and are generally not recommended (Singer & Willett, 2003; Snijders & Bosker, 1999).
</H&R 2007 excerpt>

As others have suggested, a better approach is to use a multilevel model, with measurement occasions clustered within individuals.  If you don't have it, you may wish to consult the Singer & Willett (2003) book mentioned above--and notice that the UCLA Textbook Examples site has SPSS syntax for many (if not all) of the examples in it.

   http://www.ats.ucla.edu/stat/examples/alda/

HTH.

References

Hoffman, L., & Rovine, M. J. (2007).  Multilevel models for the experimental psychologist:  Foundations and illustrative examples.  Behavior Research Methods, 39(1), 101-117. doi: 10.3758/BF03192848

Singer, J. D., & Willett, J. B. (2003). Applied longitudinal data analysis: Modeling change and event occurrence. Oxford university press.




--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Mixed modeling - issues

Maguin, Eugene
As I read the request, the OP wanted to have a listing/file whose records listed the slope for each person. I certainly am willing to learn something here, but as I see the problem, it's simply a within person regression problem with time as the only predictor. My understanding is that OLS is as good as ML for this kind of problem so Mixed is a waste of time (and a repeated statement is wrong).  He (I assume 'he') had problems with the regression for reasons I don't understand at all and his posting is lacking in things that would help diagnose that.

However, if his intention is to characterize the group as whole. Then, yes, absolutely, I agree: use mixed to fit the model (I'd choose a growth curve model with a random intercept and, possibly, a random slope).

Gene Maguin



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver
Sent: Thursday, September 25, 2014 2:13 PM
To: [hidden email]
Subject: Re: Mixed modeling - issues

Andy W wrote
> I highly doubt you want to use SPLIT FILE before the MIXED command.

That SPLIT FILE is part of the advice the OP read in the Pfister et al article in TQMP.  The approach advocated there is one that some people call the "slopes as outcomes" method.  E.g., here is an excerpt from Hoffman & Rovine (2007) that uses that name for it:

<H&amp;R 2007 excerpt>
A second alternative [for analyzing data with a quantitative repeated measures design factor] is a two-stage approach known as slopes as outcomes (see Lorch & Myers, 1990; Singer & Willett, 2003, pp. 28–44), in which regressions are performed separately for each person in the first step, and the individual regression estimates are then used as data in a between-subjects analysis (i.e., ANOVA or regression).  Although intuitively appealing, this method does not account for the differential reliability of the individual regression estimates, which can result in biases in unknown directions. Such two-stage procedures are also statistically inefficient and are generally not recommended (Singer & Willett, 2003; Snijders & Bosker, 1999).
</H&amp;R 2007 excerpt>

As others have suggested, a better approach is to use a multilevel model, with measurement occasions clustered within individuals.  If you don't have it, you may wish to consult the Singer & Willett (2003) book mentioned above--and notice that the UCLA Textbook Examples site has SPSS syntax for many (if not all) of the examples in it.

   http://www.ats.ucla.edu/stat/examples/alda/

HTH.

References

Hoffman, L., & Rovine, M. J. (2007).  Multilevel models for the experimental
psychologist:  Foundations and illustrative examples.  Behavior Research Methods, 39(1), 101-117. doi: 10.3758/BF03192848

Singer, J. D., & Willett, J. B. (2003). Applied longitudinal data analysis:
Modeling change and event occurrence. Oxford university press.








-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Mixed-modeling-issues-tp5727400p5727406.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Mixed modeling - issues

Andy W
In reply to this post by Bruce Weaver
Good detective work Bruce. If you want the slopes from the OLS models you actually don't need OMS - you can just specify a particular file to be saved on the OUTFILE subcommand for REGRESSION. The SPLIT FILE variable is still saved in the exported dataset. (You may want OMS to suppress all the tables that are generated though.)

I showed in this post for exploratory data analysis how one can graph the individual slopes with GGRAPH code, http://andrewpwheeler.wordpress.com/2014/07/13/smoothed-regression-plots-for-multi-level-data/. But totally agree with the suggestions, obviously you can't split the file by subject and estimate any model that depends on having multiple subjects observed (like the OP is trying to do).
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: Mixed modeling - issues

Pluis
In reply to this post by Maguin, Eugene
He Gene,
You understood me (almost) perfectly. (though I am a she ;))
And to all the other who responded: thank you for your reactions, I learned a lot today. I will certainly be reading the suggested literature.

My mistake was that I thought that if I were to calculate slopes with mixed instead of with 'simple' regression, the slopes would be more accurate somehow.

I understand now that I don't need to create a seperate variable with slopes per subject to use mixed (because that is not the point of mixed).

The only thing I still don't understand, is the insufficiënt memory error. In addition to the syntax I posted here, I also tried just running the mixed syntax (so without the OMS and split file commands) and I still got the insufficient memory error. Is that simply because I analysed time vs kidney function instead of kidney function vs another covariate over time? Is 500 subjects with 1 to 81 measurements too much to handle for spss?

Reply | Threaded
Open this post in threaded view
|

Re: Mixed modeling - issues

Ryan
The UNstructured covariance structure specification on the REPEATED statement will produce such an error when subjects are measured so many times at unequal intervals. Again, I believe a random coefficient (random intercepts and slopes) would be a reasonable option for the dataset you showed and RQ you stated. In fact, this seems like a classic example for a random coefficient model. There are assumptions that would need to be evaluated.

I urge you to search the archives, as I did last time, and perhaps purchase a book on longitudinal models.

Ryan

Sent from my iPhone

> On Sep 26, 2014, at 4:52 AM, Pluis <[hidden email]> wrote:
>
> He Gene,
> You understood me (almost) perfectly. (though I am a she ;))
> And to all the other who responded: thank you for your reactions, I learned
> a lot today. I will certainly be reading the suggested literature.
>
> My mistake was that I thought that if I were to calculate slopes with mixed
> instead of with 'simple' regression, the slopes would be more accurate
> somehow.
>
> I understand now that I don't need to create a seperate variable with slopes
> per subject to use mixed (because that is not the point of mixed).
>
> The only thing I still don't understand, is the insufficiënt memory error.
> In addition to the syntax I posted here, I also tried just running the mixed
> syntax (so without the OMS and split file commands) and I still got the
> insufficient memory error. Is that simply because I analysed time vs kidney
> function instead of kidney function vs another covariate over time? Is 500
> subjects with 1 to 81 measurements too much to handle for spss?
>
>
>
>
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Mixed-modeling-issues-tp5727400p5727411.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD