Programming the statistical procedures from SAS

Proc Mixed Doubly Repeated Measures Var-Cov matrix understanding.

Reply
Regular Learner
Posts: 1

Proc Mixed Doubly Repeated Measures Var-Cov matrix understanding.

[ Edited ]

Hello everyone. 

I am trying to understand the var-covariance structure.

My data is doubly repeated measures over space and time. 

For this example, I run the data with 3 repeated levels for space(depth) and 4 for time.

The code is the following.

 

Proc MIXED DATA=Na;
Class SoilType Depth Source Permeable LawnAccess Time;
Model ConcNa = Depth SoilType Source Permeable LawnAccess Time SoilType*Depth SoilType*Time Depth*Source Permeable*Source Permeable*SoilType;
Repeated Depth Time / Subject= unit type=un@ar(1) r rcorr;

 

The type used is unstructured for space and autoregressive for time.

See below for the parameters and matrices.

My questions ares:

 

1)I am trying to calculated by myself using the parameters and the structure examples obtained on the SAS website (https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_mixed_sect0...). However the values do not match with the output of R matrix for subject 1. 

 

2) A direct product between my unstructured matrix (3x3) and my ar(1) matrix (4x4) should not be a 12 x 12 matrix? 

The result output is only 4 x 4.

 

 

The result  parameters and matrices are:

 

Covariance Parameter Estimates
Cov ParmSubjectEstimate
Depth UN(1,1)Unit2097.9
UN(2,1)Unit824.5
UN(2,2)Unit461.99
UN(3,1)Unit92.203
UN(3,2)Unit77.9701
UN(3,3)Unit134.94
Time AR(1)Unit0.04604

 

 

Estimated R Matrix for Subject 1
RowCol1Col2Col3Col4
1134.9406.21230.013292.2030
26.2123134.9400.28604.2447
30.01320.2860134.9400.0090
492.20304.24470.00902097.9
     
Estimated R Correlation Matrix for Subject 1
RowCol1Col2Col3Col4
110.04604000.00009800.1733000
20.04604010.00211900.0079780
30.0000980.002119010.0000170
40.1733000.00797800.00001701

 

 

Thank you very much!

 

Marcelo.

Ask a Question
Discussion stats
  • 0 replies
  • 159 views
  • 0 likes
  • 1 in conversation