BookmarkSubscribeRSS Feed
mahmood
Calcite | Level 5

Hello,

 

Thanks to everyone. I have a question on Proc mixed: I am using longitudinal/panel data. I have a random intercept model and the G matrix I am getting shows (only) row one for the first ID. Is this correct? How can I explain this?

 

 Estimated G Matrix

 

                            Row    Effect       NEW_PIN         Col1

 

                              1    Intercept       10001      0.1448

8 REPLIES 8
Rick_SAS
SAS Super FREQ

Please post the code that you are using. 

 

Is your output from a table or from a data set?

You say "first.ID", is this for a computation that includes BY group processing? Does the log provide any information, such as the model did not converge except for the first BY group?

mahmood
Calcite | Level 5

Hi, following is the code. x1, x2, x3 are time-variant; x1_mean x2_mean x3_mean are individual mean over time; z are time-invariant.

 

proc mixed data = reg_fin_1 noitprint PLOTS(MAXPOINTS= 20000000000) ;

class ID ;

by _imputation_ ;

model Y_i,t = x1_i,t x2_i,t x3_i,t x1_mean x2_mean x3_mean z1 z2 z3

 

/solution ddfm = bw residual ;

 

random intercept / subject = ID type = un solution g ;

 

ods output solutionF=mxparms3 ;

run;

mahmood
Calcite | Level 5
converged well; no warning or notice on the log
mahmood
Calcite | Level 5
NEW_PIN is the ID
Rick_SAS
SAS Super FREQ

I don't understand your syntax. What are the commas doing in the MODEL statement?

 

model Y_i,t = x1_i,t x2_i,t x3_i,t

mahmood
Calcite | Level 5
sorry, the actual syntax:
model depression =

financial_stress personal_rel_stress
other_stress VPA age
with_both_parents

fin_stress_M perso_stress_M other_stress_M VPA_M age_M

female mother_university ln_density_house
self_esteem parent_born_canada

/solution ddfm = bw residual ;
mahmood
Calcite | Level 5
on previous syntax: i is individual, and t = time
mahmood
Calcite | Level 5

Hello,

 

It seems that the G matrix only prints for the first observation. However, for the R matrix we can select which observations.

 

Thanks,

Rahid Mahmood

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 1839 views
  • 0 likes
  • 2 in conversation