Hello, I am working on a dataset that I am interested in the effect of A including two covariates (cov1 and cov2) on Y. I want to use a hierarhical model because different levels of A were used in 10 years, in 300 locations (within each year) and I should take into account the non-independence of the observations within location-years. This is the model I am using: proc mixed data=dataset plots=all;
class year location A;
model Y=A|cov1|cov2/ddfm=satterth s outp=res;
random intercept location A(location)/subject=year;
run; I also want to take into account any spatial auto-correlation (I have the coordinates for each location). I extracted the residuals of the previous model (outp=res in the model statement) and using proc variogram, I concluded that the spherical covariance structure with nugget effect agrees the best with my data (better than Gaussian and exponential). But I am not sure how to set up my model properly to account for G-side (random statement) and R-side (repeated) errors in proc mixed. This is the model I am considering so far: proc mixed data=dataset plots=all;
class year location A;
model Y=A|cov1|cov2/ddfm=satterth s;
random intercept location A(location)/subject=year;
repeated /subject=A(year) type=sp(sph) (lat long) local;
run; Similar models (I tried a few different repeated statements) resulted in non-positive Hessian matrix. Any ideas of the proper approach? Thank you all in advance
... View more