SPSS Syntax MIXED Model

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

SPSS Syntax MIXED Model

Zalihe
I just wanted to ask something about the SPSS problem i am trying to solve.

I have repeated measures of a blood test for each patient (2-15 measurements per patient) and i want to find out the effect of each independent variables such as age, gender and ethnicity on the decline of this blood test over time. Therefore i am trying to run a random intercept and random slope models on repeated measurements by using MIXED model procedure in SPSS. However, the program is giving me an error of saying that there is insufficient memory to estimate model parameters. Totally i have 135823 cases of rows. When i tried to run in a smaller size of cases, the code did worked. What can i do to solve my problem ? Is it a problem due to computer memory or SPSS memory ? How can i make the code work ?

My code is something like;

MIXED Blood_test_Value BY Gender Ethnicity WITH Age
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(5) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0,
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=Gender Ethnicity Age | SSTYPE(3)
  /METHOD=ML
  /PRINT=G  SOLUTION TESTCOV
  /RANDOM= INTERCEPT | SUBJECT(ID) COVTYPE(ID)
 /REPEATED= Time_point  | SUBJECT(ID) COVTYPE(UNR).

Thank you.
Zalihe.
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Alex Reutter
Typically, I think a random coefficient model will look like:

MIXED
 
Blood_test_Value BY Gender Ethnicity WITH Age
 /FIXED =
Gender Ethnicity Age | SSTYPE(3)
 /METHOD = REML
 /RANDOM INTERCEPT Age | SUBJECT(id) COVTYPE(UNR) .


See, for example, Model 5 at http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/topic/com.ibm.spss.statistics.help/syn_mixed_examples.htm.  I don't think the REPEATED statement belongs; the random slope should be modeled as part of the RANDOM subcommand.

Alex




From:        Zalihe <[hidden email]>
To:        [hidden email]
Date:        07/01/2012 08:03 PM
Subject:        SPSS Syntax MIXED Model
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I just wanted to ask something about the SPSS problem i am trying to solve.

I have repeated measures of a blood test for each patient (2-15 measurements
per patient) and i want to find out the effect of each independent variables
such as age, gender and ethnicity on the decline of this blood test over
time. Therefore i am trying to run a random intercept and random slope
models on repeated measurements by using MIXED model procedure in SPSS.
However, the program is giving me an error of saying that there is
insufficient memory to estimate model parameters. Totally i have 135823
cases of rows. When i tried to run in a smaller size of cases, the code did
worked. What can i do to solve my problem ? Is it a problem due to computer
memory or SPSS memory ? How can i make the code work ?

My code is something like;

MIXED Blood_test_Value BY Gender Ethnicity WITH Age
 /CRITERIA=CIN(95) MXITER(100) MXSTEP(5) SCORING(1)
SINGULAR(0.000000000001) HCONVERGE(0,
   ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
 /FIXED=Gender Ethnicity Age | SSTYPE(3)
 /METHOD=ML
 /PRINT=G  SOLUTION TESTCOV
 /RANDOM= INTERCEPT | SUBJECT(ID) COVTYPE(ID)
/REPEATED= Time_point  | SUBJECT(ID) COVTYPE(UNR).

Thank you.
Zalihe.

Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Zalihe
Dear Alex,

Thank you for your reply. REPEATED statement is there for repeated measurement analysis which is the Model 11 in the link you have send me.
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Alex Reutter
Model 11 will not estimate a random slope, as stated as desired in the original post, while Model 5 will.  I think there can be good reasons for fitting the data either way, but you need to decide what you're trying to estimate.  

I also just realized that Time_point is your index for repeated measurements and not Age, and so would amend the random coefficients model to be:

MIXED
 
Blood_test_Value BY Gender Ethnicity WITH Age Time_point
 /FIXED =
Gender Ethnicity Age Time_point | SSTYPE(3)
 /METHOD = REML
 /RANDOM INTERCEPT
Time_point | SUBJECT(id) COVTYPE(UNR) .

Alex
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Ryan
I believe Alex's parameterization is headed in the desired direction
of the OP. I might take issue with using a "UNR" structure instead of
a "UN" structure to start but I'll save my reasoning for another time.
Nevertheless, more needs to be done with respect to the fixed effects
component of the model to answer the original research question,
"...effect of each independent variables such as age, gender and
ethnicity on the decline of this blood test over time." In order to do
so, the FIXED statement needs to be modified as follows:

/FIXED = Gender Ethnicity Age Time_point Gender*Time_point
Ethnicity*Time_point Age*Time_point | SSTYPE(3)

Whether the OP wants to incorporate a REPEATED statement (which is
known as a "residual change model") versus a RANDOM statement with an
intercept and slope (which is known as a growth curve model) depends
on whether the OP is interested in estimating differences between
individual linear trajectories over time. If so, the
random-coefficient regression model (the model with the RANDOM
statement with an intercept and slope) is the way to go.

BTW, ignoring the fixed effects component for the moment, there is
absolutely nothing wrong with a combination of the RANDOM and REPEATED
statements posted originally by the OP. These statements combined in
the same model indicate that conditional upon the subject-specific
intercepts, there is residual correlation from observations obtained
by the same subject along with time-invariant residual variances. The
problem is that a random intercept coupled with an UNstructured
residual correlation matrix is inconsistent with what the OP
described. Furthermore, the fixed effects component did not include
Time_point or its interaction with the other variables, which are both
necessary in order to assess the effect of the independent variables
on the temporal linear change in the expected value of y.

Finally, no explanation was provided as to why the number of
measurements per subject varied between 2 and 15. I would be
interested in understanding why this is the case. This leads me to
wonder about various other aspects of the variable Time_point but I'll
refrain from going any further for now.

HTH,

Ryan

On Mon, Jul 2, 2012 at 2:13 PM, Alex Reutter <[hidden email]> wrote:

> Model 11 will not estimate a random slope, as stated as desired in the
> original post, while Model 5 will.  I think there can be good reasons for
> fitting the data either way, but you need to decide what you're trying to
> estimate.
>
> I also just realized that Time_point is your index for repeated measurements
> and not Age, and so would amend the random coefficients model to be:
>
> MIXED
>  Blood_test_Value BY Gender Ethnicity WITH Age Time_point
>  /FIXED = Gender Ethnicity Age Time_point | SSTYPE(3)
>  /METHOD = REML
>  /RANDOM INTERCEPT Time_point | SUBJECT(id) COVTYPE(UNR) .
>
> Alex

=====================
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
|

Automatic reply: SPSS Syntax MIXED Model

Tierney, Mary Lou

I am PTOB 2 July returning to the office on Monday 9 July. 

 

For assistance with the MITRE Innovation Program please contact the [hidden email]

 

For assistance with Project/Portfolio Pages or Discover, please contact the [hidden email]

 

For assistance with other Innovation Zone sites, such as CI&T InZone, please contact [hidden email].

 

 

Regards,

Mary Lou

Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Zalihe
In reply to this post by Ryan
Thank you for your reply Ryan,

I will explain you the research question in more detail for help. I have got a General Practice (GP) data set where each patient has repeated measurements on a blood test. Measurement dates are not same for each patient and the intervals between the measurements are not same either. The time_point indicates the order of the measurement like measurement 1, measurement 2, measurement 3...etc. There are up to 15 measurements per patient, the reason for variation between the number of measurements per subject is the missing data, so level 1 variable is the measurement taken within individual and level 2 variable is the patient. Repeated measured blood test is our dependent variable because the diagnosis of the particular disease is based on the value of this blood test. I am trying to investigate the effect of each independent variable such as age, gender, ethnicity... on dependent variable and also the effect on the decline of the dependent variable over time, so for example: is the person at age 30 has a higher decline from the measurement time point 1 to 2 compared to person at age 60 ? In that case, will a code like this be appropriate to use?


MIXED Blood_test_Value BY Gender Ethnicity Hypertension_diagnosis Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Time_point WITH Age
  /CRITERIA = CIN(95) MXITER(150) MXSTEP(5) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = Gender Ethnicity Age Hypertension_diagnosis Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Time_point Gender*Time_point Ethnicity*Time_point Hypertension_diagnosis*Time_point
Diabetes_Diagnosis*Time_point IHD_Diagnosis*Time_point Anaemia_Diagnosis*Time_point Obesity_Diagnosis*Time_point Age*Time_point| SSTYPE(3)
  /METHOD = ML
  /PRINT = G R SOLUTION TESTCOV
  /RANDOM = INTERCEPT | SUBJECT(ID) COVTYPE(ID)
  /REPEATED = Time_point  | SUBJECT(ID) COVTYPE(AR1) .

Thank you for your help again.

Regards,

Zalihe.
Reply | Threaded
Open this post in threaded view
|

UN vs. UNR [was Re: SPSS Syntax MIXED Model]

Alex Reutter
In reply to this post by Ryan
Regardless of how the conversation with the OP unfolds, I'd be interested in your thoughts on this when you have time.  UNR should simply be a reparameterization of UN that yields the same model, but perhaps there are some cases where that breaks down?

Cheers,
Alex




From:        R B <[hidden email]>
To:        [hidden email]
Date:        07/02/2012 07:35 PM
Subject:        Re: SPSS Syntax MIXED Model
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I might take issue with using a "UNR" structure instead of
a "UN" structure to start but I'll save my reasoning for another time.

Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Ryan
In reply to this post by Zalihe
Zalihe,
 
My thoughts are interspersed below.
 
> On Tue, Jul 3, 2012 at 4:36 AM, Zalihe <[hidden email]> wrote:
> Thank you for your reply Ryan,
>
> I will explain you the research question in more detail for help. I have got
> a General Practice (GP) data set where each patient has repeated
> measurements on a blood test. Measurement dates are not same for each
> patient and the intervals between the measurements are not same either.
 
If the intervals between measurements are not equal (or not nearly equal), then employing an autoregressive residual structure is invalid. In fact, I suggest that you forget about the REPEATED statement. Technically, an unstructured residual matrix can never be wrong, but it's likely too complex given the way in which the measurements were collected (unequal time intervals between and within patients). It is worth noting that the MIXED procedure in SAS offers a variety of spatial covariance structures which can handle unequal intervals while accounting for decaying residual correlations as observations become more distant in time, but I'll stick within the confines of SPSS for this post. With that stated, using the MIXED procedure in SPSS, a random coefficient model seems like your best option.
 
> The
> time_point indicates the order of the measurement like measurement 1,
> measurement 2, measurement 3...etc. There are up to 15 measurements per
> patient, the reason for variation between the number of measurements per
> subject is the missing data,
 
Are the data missing completely at random (MCAR) or missing at random (MAR)? If not, you might need to rethink the analytic approach.
 
> so level 1 variable is the measurement taken
> within individual and level 2 variable is the patient. Repeated measured
> blood test is our dependent variable because the diagnosis of the particular
> disease is based on the value of this blood test. I am trying to investigate
> the effect of each independent variable such as age, gender, ethnicity... on
> dependent variable and also the effect on the decline of the dependent
> variable over time, so for example: is the person at age 30 has a higher
> decline from the measurement time point 1 to 2 compared to person at age 60
> ? In that case, will a code like this be appropriate to use?
 
This is not easy to explain over email. Moreover, I'm quite distracted by other pressing work. Having said that, I'm going to try to help get you started. In order to make any movement, I need to make some assumptions:
 
(1) You have the date associated for when the measurements were taken on each subject.
(2) The first measurement was taken shortly before diagnosis.
(3) Patients you are tracking are getting equivalent forms of treatment that started shortly after diagnosis.
 
If yes to all 3 assumptions, then create a Time variable that reflects number of days since baseline. The first measurement on each patient will be considered baseline and should be coded as 0, and subsequent measurements will reflect the number of days since the first measurement/baseline. Concretely, if patient 1 was measured three times (baseline, 5 days post-baseline and 25 days post-baseline, then the dataset should look like this:
 
Patient_ID  Time
1             0
1             5
1            25
2
2
.
.
.
 
Needless to say, if patients are measured more frequently (e.g., multiple times in a single day), then you should make the measurement unit number of hours or minutes since baseline.
 
With that said, I'd parameterize the model as follows:
 
 MIXED Y BY <categorical predictors> WITH Age Time
  /FIXED = <categorical predictors> Age Time <two-way interactions between each predictor and Time> | SSTYPE(3)
  /METHOD = REML
  /PRINT = G SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time | SUBJECT(Patient_ID) COVTYPE(UN).
I am assuming that there is a linear relationship between time and the dependent variable. You can certainly consider exploring other types of relationships. Same goes for Age.
 
At any rate, with the model proposed above you should be able to answer all sorts of research questions using the TEST sub-command (e.g. is the estimated mean on day X since baseline for males significantly different than females; is the slope for males significantly different for females). Examining the estimates from the random effects covariance (G) matrix could prove useful as well, but no time to discuss this right now.
 
Write back if you have additional questions and I'll try to respond when time permits.
 
HTH,
 
Ryan
 
>
>
> MIXED Blood_test_Value BY Gender Ethnicity Hypertension_diagnosis
> Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis
> Time_point WITH Age
>   /CRITERIA = CIN(95) MXITER(150) MXSTEP(5) SCORING(1)
>   SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
>   PCONVERGE(0.000001, ABSOLUTE)
>   /FIXED = Gender Ethnicity Age Hypertension_diagnosis Diabetes_Diagnosis
> IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Time_point
> Gender*Time_point Ethnicity*Time_point Hypertension_diagnosis*Time_point
> Diabetes_Diagnosis*Time_point IHD_Diagnosis*Time_point
> Anaemia_Diagnosis*Time_point Obesity_Diagnosis*Time_point Age*Time_point|
> SSTYPE(3)
>   /METHOD = ML
>   /PRINT = G R SOLUTION TESTCOV
>   /RANDOM = INTERCEPT | SUBJECT(ID) COVTYPE(ID)
>   /REPEATED = Time_point  | SUBJECT(ID) COVTYPE(AR1) .
>
> Thank you for your help again.
>
> Regards,
>
> Zalihe.
>
> --
> 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
 
 
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Zalihe

Hi Ryan,

Firstly, i would like to thank you so much for your help and comments. Since all the three assumptions you were discussing about were true in my case, i have created a time variable as you told me. I have also created the corresponding age variable which changes as time change. Then, i have run the following code;


MIXED eGFR_Value BY Gender Ethnicity WITH Age
  /CRITERIA = CIN(95) MXITER(150) MXSTEP(5) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = Gender Ethnicity Age Time Gender*Time Ethnicity*Time Age*Time | SSTYPE(3)
  /METHOD = ML
  /PRINT = G R SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time | SUBJECT(ID) COVTYPE(UN).

where the eGFR_Value is the repeated measured blood test result which is my dependent variable.
I have also run the similar code with creating a variable called "Age-centered" where i have centered the Age variable by subtracting the mean age from individual age values, so by this way the age_centered variable will have the mean age zero that will standardize the distribution of age.

When i tried to add the some other predictor variables as such the following code;

MIXED eGFR_Value  BY Gender Ethnicity Hypertension_diagnosis Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Time_point WITH Age
  /CRITERIA = CIN(95) MXITER(150) MXSTEP(5) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = Gender Ethnicity Age Hypertension_diagnosis Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Time_point Gender*Time_point Ethnicity*Time_point Hypertension_diagnosis*Time_point
Diabetes_Diagnosis*Time_point IHD_Diagnosis*Time_point Anaemia_Diagnosis*Time_point Obesity_Diagnosis*Time_point Age*Time_point| SSTYPE(3)
  /METHOD = ML
  /PRINT = G R SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time| SUBJECT(ID) COVTYPE(UN).

At this point, i still have the same error message. Saying that "insufficient memory to estimate model parameters, execution of this command stops".

I also thought that analyzing such situation by adding a REPEATED command in order to analyze repeated measures should be needed and i tried that as well by having a code such as the following;

MIXED eGFR_Value  BY Gender Ethnicity Hypertension_diagnosis Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Time_point WITH Age
  /CRITERIA = CIN(95) MXITER(150) MXSTEP(5) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = Gender Ethnicity Age Hypertension_diagnosis Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Time_point Gender*Time_point Ethnicity*Time_point Hypertension_diagnosis*Time_point
Diabetes_Diagnosis*Time_point IHD_Diagnosis*Time_point Anaemia_Diagnosis*Time_point Obesity_Diagnosis*Time_point Age*Time_point| SSTYPE(3)
  /METHOD = ML
  /PRINT = G R SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time| SUBJECT(ID) COVTYPE(UN)
  /REPEATED = Observation_point  | SUBJECT(ID) COVTYPE(UN) .

However, this code also gives me the same error message as stated in the previous code.

Can you please help me to run these codes ? Thank you so much again for your interest and help.

Kind Regards,

ZALIHE.
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Zalihe
Dear Ryan,

I am so sorry but i have realized that i have copied you the wrong syntaxes in the previous e-mail.

The first code i have mentioned which have worked is;

MIXED eGFR_Value BY Gender Ethnicity WITH Age Time
  /CRITERIA = CIN(95) MXITER(150) MXSTEP(5) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = Gender Ethnicity Age Time Gender*Time Ethnicity*Time Age*Time | SSTYPE(3)
  /METHOD = ML
  /PRINT = G R SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time | SUBJECT(ID) COVTYPE(UN).

The second code which i have tried and couldn't be able to make it working is;

MIXED eGFR_Value  BY Gender Ethnicity Hypertension_diagnosis Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis WITH Age Time
  /CRITERIA = CIN(95) MXITER(150) MXSTEP(5) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = Gender Ethnicity Age Hypertension_diagnosis Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Gender*Time Ethnicity*Time
Hypertension_diagnosis*Time Diabetes_Diagnosis*Time IHD_Diagnosis*Time Anaemia_Diagnosis*Time Obesity_Diagnosis*Time Age*Time | SSTYPE(3)
  /METHOD = ML
  /PRINT = G R SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time| SUBJECT(ID) COVTYPE(UN).

The third code which is agaion gave me the same error is;


MIXED eGFR_Value  BY Gender Ethnicity Hypertension_diagnosis Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Observation_point
WITH Age Time
  /CRITERIA = CIN(95) MXITER(150) MXSTEP(5) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = Gender Ethnicity Age Hypertension_diagnosis Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Gender*Time Ethnicity*Time
Hypertension_diagnosis*Time Diabetes_Diagnosis*Time IHD_Diagnosis*Time Anaemia_Diagnosis*Time Obesity_Diagnosis*Time Age*Time | SSTYPE(3)
  /METHOD = ML
  /PRINT = G R SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time| SUBJECT(ID) COVTYPE(UN)
  /REPEATED = Observation_point  | SUBJECT(ID) COVTYPE(UN) .

If you can comment on my problem when you have time, i will be pleased. Thank you so much and so sorry again for confusion.

Kind Regards,

Zalihe.
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Ryan
Zalihe,
 
A few very brief comments:
 
(1) The REPEATED statement [as currently written] in the 3rd model is likely overkill AND inappropriate since the levels of "observation_point" do not mean the same thing for each subject. The RANDOM statement is accounting for differences between subjects with respect to intercepts at t=0 and linear trajectories (aka slopes). Let me be more direct...Within subject correlation due to repeated measures (multiple observations per subject) is being accounted for by the RANDOM statement.
 
(2) I cannot pinpoint from over here why model 2 cannot be handled by the MIXED procedure in SPSS on your machine. If you have access to SAS, then you might consider the HPMIXED procedure. The HPMIXED procedure is a fairly recent procedure in SAS which is designed to handle complex models and large datasets. OTOH, the fixed effects component of your second model does seem to be getting quite large. You might need to remind yourself about what the primary research question is and whether you really need all of those fixed effects in order to answer it. Don't lose the forest for the trees.
 
(3) The default estimation method is REML. Why do you keep changing it to ML? Is it to conduct likelihood ratio tests to compare nested models? If not, you might consider going back to the default estimation method; it is generally the preferred choice.
 
Ryan
On Fri, Jul 6, 2012 at 10:24 AM, Zalihe <[hidden email]> wrote:
Dear Ryan,

I am so sorry but i have realized that i have copied you the wrong syntaxes
in the previous e-mail.

The first code i have mentioned which have worked is;

MIXED eGFR_Value BY Gender Ethnicity WITH Age Time
  /CRITERIA = CIN(95) MXITER(150) MXSTEP(5) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = Gender Ethnicity Age Time Gender*Time Ethnicity*Time Age*Time |
SSTYPE(3)
  /METHOD = ML
  /PRINT = G R SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time | SUBJECT(ID) COVTYPE(UN).

The second code which i have tried and couldn't be able to make it working
is;

MIXED eGFR_Value  BY Gender Ethnicity Hypertension_diagnosis
Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis WITH
Age Time
  /CRITERIA = CIN(95) MXITER(150) MXSTEP(5) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = Gender Ethnicity Age Hypertension_diagnosis Diabetes_Diagnosis
IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Gender*Time Ethnicity*Time
Hypertension_diagnosis*Time Diabetes_Diagnosis*Time IHD_Diagnosis*Time
Anaemia_Diagnosis*Time Obesity_Diagnosis*Time Age*Time | SSTYPE(3)
  /METHOD = ML
  /PRINT = G R SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time| SUBJECT(ID) COVTYPE(UN).

The third code which is agaion gave me the same error is;


MIXED eGFR_Value  BY Gender Ethnicity Hypertension_diagnosis
Diabetes_Diagnosis IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis
Observation_point
WITH Age Time
  /CRITERIA = CIN(95) MXITER(150) MXSTEP(5) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = Gender Ethnicity Age Hypertension_diagnosis Diabetes_Diagnosis
IHD_Diagnosis Anaemia_Diagnosis Obesity_Diagnosis Gender*Time Ethnicity*Time
Hypertension_diagnosis*Time Diabetes_Diagnosis*Time IHD_Diagnosis*Time
Anaemia_Diagnosis*Time Obesity_Diagnosis*Time Age*Time | SSTYPE(3)
  /METHOD = ML
  /PRINT = G R SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time| SUBJECT(ID) COVTYPE(UN)
  /REPEATED = Observation_point  | SUBJECT(ID) COVTYPE(UN) .

If you can comment on my problem when you have time, i will be pleased.
Thank you so much and so sorry again for confusion.

Kind Regards,

Zalihe.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/SPSS-Syntax-MIXED-Model-tp5713934p5714053.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

Reply | Threaded
Open this post in threaded view
|

Re: UN vs. UNR [was Re: SPSS Syntax MIXED Model]

Ryan
In reply to this post by Alex Reutter
Alex,
 
The abbreviated answer is that I misspoke previously. In general, yes, UNR should simply be a reparameterization of UN. I do know that there have been reported incidents where the MIXED procedure in SAS has produced different results. However, I have never encountered that phenomenon in SPSS. Frankly, those inconsistencies reported from the MIXED procedure in SAS had nothing to do with why I suggested to use UN instead of UNR. However, a quick simulation experiment shows that my thinking was off as to what would happen to the elements along the main diagonal. No time to discuss or explore further.
 
The idea of fitting a growth curve via a random coefficient regression model is an interesting topic, and I believe that a detailed discussion around its utility can push the boundaries a bit as to what's been discussed on SPSS-L previously regarding some of the real potential of the MIXED procedure in SPSS. I'll try to kick start such a discussion sometime in the near future.

Best,
 
Ryan
 
On Tue, Jul 3, 2012 at 9:00 AM, Alex Reutter <[hidden email]> wrote:
Regardless of how the conversation with the OP unfolds, I'd be interested in your thoughts on this when you have time.  UNR should simply be a reparameterization of UN that yields the same model, but perhaps there are some cases where that breaks down?

Cheers,
Alex




From:        R B <[hidden email]>
To:        [hidden email]
Date:        07/02/2012 07:35 PM
Subject:        Re: SPSS Syntax MIXED Model
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I might take issue with using a "UNR" structure instead of
a "UN" structure to start but I'll save my reasoning for another time.


Reply | Threaded
Open this post in threaded view
|

Question regarding data formating

stace swayne

Dear list,

I have data in a DAT file that looks like this

CSC 100 $10.00 $30.00 $25.00 $10.00 $600.00 $1960.00
USS 165 $9.00 $8.00 $25.00 $16.50 $0.00 $-198.50
ITT 89 $6.00 $18.00 $40.00 $24.92 $512.64 $1012.92
MEL 165 $2.00 $39.00 $42.00 $19.80 $1923.07 $6040.80
WES 59 $4.00 $20.00 $10.00 $7.08 $217.12 $931.08

I would like line the columns of data up, but I'm not sure of an easy way to do this, I have 25,000 cases so I would prefer not to do this manually.

Thanks,

Stace
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding data formating

David Marso
Administrator
Stace,
  You *should* begin a NEW topic rather than changing the subject of an existing thread.  Things in Nabble get threaded funny and many people who might answer your question won't see it because it is lost beneath a different topic.  Meanwhile, DATA LIST LIST will work (see DOLLAR format).
Regards
stace swayne wrote
Dear list,

I have data in a DAT file that looks like this

CSC        100        $10.00     $30.00     $25.00     $10.00     $600.00    $1960.00
USS        165        $9.00     $8.00     $25.00     $16.50     $0.00    $-198.50
ITT         89        $6.00     $18.00     $40.00     $24.92     $512.64    $1012.92
MEL        165        $2.00     $39.00     $42.00     $19.80     $1923.07    $6040.80
WES         59        $4.00     $20.00     $10.00     $7.08     $217.12    $931.08

I would like line the columns of data up, but I'm not sure of an easy way to do this, I have 25,000 cases so I would prefer not to do this manually.

Thanks,

Stace
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Steph Bullen
In reply to this post by Ryan
Hi Ryan,

Thank you very much for your wonderful inputs - I hope you are still active on this list!

Some years on from that post, I am battling with a very similar data set to Zalihe.

I have run the main effects model as per the syntax you recommended to Zalihe in this post and it works well. However, when I add the time*<predictor variables. interactions it is giving me the following warning message:

"Iteration was terminated but convergence has not been achieved. The MIXED procedure continues despite this warning. Subsequent results produced are based on the last iteration. Validity of the model fit is uncertain."

My syntax is follows:

 MIXED Weight BY Farm Group Breed WITH Age Time Baseline_Weight
  /FIXED =Farm Breed Group Age Time Baseline_Weight Farm*Time Breed*Time Group*Time | SSTYPE(3)
  /METHOD = REML
  /PRINT = G SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time | SUBJECT(ID) COVTYPE(UN).

I am using SPSS 21.

My data set involves calves (ID) subjected to one of two treatments (Group) and weighed on Day 0 (Baseline_Weight), Day 42 (approx; actual days are identified under "Time) and Day 84. Breed, farm, age (at Day 0) are recorded.

Any assistance would be extremely gratefully received. You have no idea how helpful your inputs have been up until now. :)

Thank you in advance!

Steph


 
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Steph Bullen
In reply to this post by Ryan
Hi Ryan,

Thank you very much for your wonderful inputs - I hope you are still active on this list!

Some years on from that post, I am battling with a very similar data set to Zalihe.

I have run the main effects model as per the syntax you recommended to Zalihe in this post and it works well. However, when I add the time*<predictor variables. interactions it is giving me the following warning message:

"Iteration was terminated but convergence has not been achieved. The MIXED procedure continues despite this warning. Subsequent results produced are based on the last iteration. Validity of the model fit is uncertain."

My syntax is follows:

 MIXED Weight BY Farm Group Breed WITH Age Time Baseline_Weight
  /FIXED =Farm Breed Group Age Time Baseline_Weight Farm*Time Breed*Time Group*Time | SSTYPE(3)
  /METHOD = REML
  /PRINT = G SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time | SUBJECT(ID) COVTYPE(UN).

I am using SPSS 21.

My data set involves calves (ID) subjected to one of two treatments (Group) and weighed on Day 0 (Baseline_Weight), Day 42 (approx; actual days are identified under "Time) and Day 84. Breed, farm, age (at Day 0) are recorded.

Any assistance would be extremely gratefully received. You have no idea how helpful your inputs have been up until now. :)

Thank you in advance!

Steph
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Steph Bullen
Just to add to the previous post, I have re-run the syntax with individual interactions (i.e. group*time and breed*time) but it seems the error message is associated with the farm*time interaction but I can't work out why.

There are 5 farms coded A, B, C, D and E

I expect there to be quite a pronounced interaction as the farmer availability was the reason for unequal sampling intervals - if that helps?

TIA.

Steph
Reply | Threaded
Open this post in threaded view
|

Re: SPSS Syntax MIXED Model

Maguin, Eugene
In reply to this post by Steph Bullen
I'm trying to visualize your project from your syntax and this is what I get. Five farms, on each farm two groups of calves. Breed comes in somehow. Maybe connected to farm, maybe connected to group, maybe connected to both. Groups are treated differently. Calves are measured, let's say weighed, three times but not always on the same number of days since time=0, whatever that point means. Calves are somewhat different ages at time 0.

I'm curious: What is the total N.
What is the variance of the time effect and the covariance of the time*intercept effect?
Presumably this model is a step in the mixed model analysis of these data. What was the model that first yielded the warning? Did you get the message with this model?

MIXED Weight WITH Time
  /FIXED = Time | SSTYPE(3)
  /METHOD = REML
  /PRINT = G SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time | SUBJECT(ID) COVTYPE(UN).

Gene Maguin

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Steph Bullen
Sent: Monday, July 20, 2015 5:38 AM
To: [hidden email]
Subject: Re: SPSS Syntax MIXED Model

Hi Ryan,

Thank you very much for your wonderful inputs - I hope you are still active on this list!

Some years on from that post, I am battling with a very similar data set to Zalihe.

I have run the main effects model as per the syntax you recommended to Zalihe in this post and it works well. However, when I add the time*<predictor variables. interactions it is giving me the following warning message:

"Iteration was terminated but convergence has not been achieved. The MIXED procedure continues despite this warning. Subsequent results produced are based on the last iteration. Validity of the model fit is uncertain."

My syntax is follows:

 MIXED Weight BY Farm Group Breed WITH Age Time Baseline_Weight
  /FIXED =Farm Breed Group Age Time Baseline_Weight Farm*Time Breed*Time Group*Time | SSTYPE(3)
  /METHOD = REML
  /PRINT = G SOLUTION TESTCOV
  /RANDOM = INTERCEPT Time | SUBJECT(ID) COVTYPE(UN).

I am using SPSS 21.

My data set involves calves (ID) subjected to one of two treatments (Group) and weighed on Day 0 (Baseline_Weight), Day 42 (approx; actual days are identified under "Time) and Day 84. Breed, farm, age (at Day 0) are recorded.

Any assistance would be extremely gratefully received. You have no idea how helpful your inputs have been up until now. :)

Thank you in advance!

Steph


 



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/SPSS-Syntax-MIXED-Model-tp5713934p5730179.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: SPSS Syntax MIXED Model

Steph Bullen
Hi Gene,

Thank you very much for your reply!

I have 441 calves which are allocated to two different treatments, control (n=220) and treatment (n=221).

Calves were weighed on Day 0 (Baseline in kg) and treatment group received treatment. Calves were different ages on Day 0 and this was recorded (Age in days)

Calves in both groups were on each farm and predominant breeds on each farm was variable but there were equal numbers of each breed (by t-test) in each group.

Calves were then weighed at approximately 6 weeks (37-50 days; depending on farm; all calves on one farm were weighed on the same day) then again at 12 weeks (80-106 days).

The error message is appearing when I run your syntax (above) with only time as the predictor. It also has an error whenever time*farm is put into the model. It is happy with all other interaction terms.

Any help/thoughts/suggestions greatly appreciated! :)

Steph


12