BookmarkSubscribeRSS Feed
kkmann
Calcite | Level 5

Hi,

 

I would like to analyse a longitudinal data set with relatively many missing values using proc mcmc. Before moving to the "missingness issue", however, I am not sure how to implement an autoregessive covariance structure in proc mcmc. I have seen a few examples on unbalanced longitudinal data with proc mcmc, but they do not model the covariance structure explicitly.

 

My data is in long format, of course, as the number of observations per subject varies. Now, to implement a specific covariance structure, I would need to define a multivariate distribution spanning multiple ROWS, would I not?

 

None of the examples I could find tackles this problem. Either the data is balanced (then it can be brought to wide format and it is clear how to specify the covariance structure) or the covariance structure was not modeled explicitly. 

 

It would be great to get some hints as to whether this is possible with proc mcmc at all, and if so, which resources could help me understand how to implement this.

 

Best,

 

Kevin 

5 REPLIES 5
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

This will take some programming. This article will help you get started.

http://support.sas.com/resources/papers/proceedings16/SAS5601-2016.pdf

 

 

kkmann
Calcite | Level 5
Thanks for that excellent article! However, they again only describe the implementation of a variance structure for balanced data, but mine is unbalanced both in number as well as time difference between observations x)
kkmann
Calcite | Level 5

can anybody comment on the use of the by statement in proc mcmc? It is supported, but I am unsure about how to utilize it for constructing the likelihood groupwise with sharerd e.g. variance parameters.

 

https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mcmc_sect01...

 

Havent seen it in any of the mcmc examples so far and the documentation is "sparse"...

Rick_SAS
SAS Super FREQ

The BY statement is the same for all SAS procedures. If there are k levels to the BY variables, then you get k independent analyses.  It is equivalent to running the procedure k times using WHERE=(ByVar=k_th_level), except it is more efficient.

 

From your description of this problem, I don't think you want to use a BY variable.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

Rick is right, the by statement is not what you want. As you know, MCMC is essentially a programming language for Bayesian analysis. The programs can be quite complex, and it is hard to give specific advice ahead of time. THe following article might help you with the "missing value" part of your problem.

http://support.sas.com/resources/papers/proceedings13/436-2013.pdf

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5 replies
  • 1365 views
  • 0 likes
  • 3 in conversation