BookmarkSubscribeRSS Feed
petter
Calcite | Level 5

I have x variables describing water properties that I want to correlate to water pollution (Y). Data are from different water utilities with repeated measurements with irregular time intervals.

I don’t expect any linear time effect on Y in the long run (the sampling were done for more than one year) but I would like model the correlation between the repeated measurements within each water utility.

Is this the SAS syntax to accomplish this? 

Proc Mixed Data=water_qual;

class water_util;

Model y = x1 x2  x3 x4 water_util/ solution DDFM=kr;

Random days / Subject=water_util type=un solution;

Run;

Another problem I have is that Y is left-censored. I can't find any mixed model repeated measurement that takes censored data into account. Anyone has suggestion? If the Null Model Likelihood Ratio Test for the model above (for the non-censored data) is close to 1 it means that it is not necessary to model the covariance structure of the data at all and I can use a tobit model (in proc lifereg) to deal with the censored data. But how to deal with the censored data if the Null Model Likelihood Ratio Test is significant?

Thanks

2 REPLIES 2
SteveDenham
Jade | Level 19

WARNING: I have not done this, but it looks like it is possible.

Perhaps PROC MCMC will work.  You would have to specify the repeated measures as something like a G side matrix.  There is something like a repeated measures analysis in the Details: MCMC Procedure > Functions of Random-Effects Parameters.

Then it comes down to specifying distributions and priors and a whole lot of art.

I think checking for structure of the repeated measures is a logical way to proceed, followed by the tobit regression if it looks like there is no real structure to the data.

Steve Denham

petter
Calcite | Level 5

Hi Steve,

And thanks for the idea of using a Bayesian approach. I will certainly give PROC MCMC a try.

Petter Lindgren

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
  • 2 replies
  • 1727 views
  • 3 likes
  • 2 in conversation