Programming the statistical procedures from SAS

Proc Mixed with Repeated Statment

Reply
Contributor
Posts: 44

Proc Mixed with Repeated Statment

Hi All,

i need small clarification for proc mixed, if any one knows then please let me know.

what is the difference b/w

Repeated variable/ subject=subjid type=UN;

                              &

Repeated variable/ type=UN;

1) if i mention subject=subjid then what it's means?

2) if not what?

Note: In My proc mixed model, subject is considered as Random effect. so that random statment will effect the repeated statment?

please clarify my doubts.

Hema B

Respected Advisor
Posts: 2,655

Re: Proc Mixed with Repeated Statment

For an unstructured R matrix (repeated statement) the two statements are very different.  Without specifying the subject=, the covariances (off-diagonal) values are zeroes.  When you specify subject=subjid, the covariances between timepoints are estimated.  This is a good thing.

However, specifying the subject as a random effect in combination with type=un (or cs or csh) will almost certainly lead to either convergence problems or statements in the output that the G matrix is not positive definite.

If, instead you model the repeated effect with a structure that specifically involves correlations, such as AR, ARH, SP(POW), ARMA or ANTE, inclusion of the random effect of subject will almost always result in a more stable and computationally precise estimate of standard errors.

Steve Denham

Contributor
Posts: 44

Re: Proc Mixed with Repeated Statment


Thanks alot steve!

Contributor
Posts: 44

Re: Proc Mixed with Repeated Statment

Hi Steven,

Thanks for your valiable reply.

so in this case if i used "Repeated variable/subject=subjid type=UN"; is it necessary to mention random statment with "Subject"?

in Repeated statment, "Subject=subjid" is random effect or fixed effect?

Thanks

Hima

Respected Advisor
Posts: 2,655

Re: Proc Mixed with Repeated Statment

Q1: No, and in fact adding a separate RANDOM statement with the subject alone will result in a non-positive definite message regarding the G matrix, as all the variability will have been explained in the R matrix.

Q2: In the repeated statement, subject=subjid isn't considered a random or fixed effect, but is a subject classifier that denotes what the repeated measure is observed upon.  I suppose in that sense, it is fixed, as it only addresses the subjects sampled in the trial, and they are assumed to be independent of one another.

Steve Denham

Ask a Question
Discussion stats
  • 4 replies
  • 343 views
  • 2 likes
  • 2 in conversation