Programming the statistical procedures from SAS

modeling autoregressive covariance structure for unbalanced longitudinal data with proc MCMC

Reply
New Contributor
Posts: 3

modeling autoregressive covariance structure for unbalanced longitudinal data with proc MCMC

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 

Valued Guide
Valued Guide
Posts: 679

Re: modeling autoregressive covariance structure for unbalanced longitudinal data with proc MCMC

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

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

 

 

New Contributor
Posts: 3

Re: modeling autoregressive covariance structure for unbalanced longitudinal data with proc MCMC

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)
New Contributor
Posts: 3

Re: modeling autoregressive covariance structure for unbalanced longitudinal data with proc MCMC

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"...

SAS Super FREQ
Posts: 3,310

Re: modeling autoregressive covariance structure for unbalanced longitudinal data with proc MCMC

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.

Valued Guide
Valued Guide
Posts: 679

Re: modeling autoregressive covariance structure for unbalanced longitudinal data with proc MCMC

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

 

Ask a Question
Discussion stats
  • 5 replies
  • 206 views
  • 0 likes
  • 3 in conversation