Hi All,
I have a dataset which contains 4 block, each block has 16 observations with made up latitude longitude with one dummy varible(proper:yes no) and age levels variable.
Block lat lng proper $ age_level
1 1 1 Yes 1
1 1 3 No 2
1 2 1 No 3
1 2 3 Yes 2
1 3 1 Yes 3
1 3 3 Yes 1
1 4 1 Yes 1
1 4 3 Yes 1
1 1 2 Yes 1
1 1 4 Yes 3
1 2 2 No 2
1 2 4 Yes 1
1 3 2 Yes 3
1 3 4 Yes 3
1 4 2 Yes 3
1 4 4 Yes 1
2 5 1 No 2
2 5 3 No 3
2 6 1 Yes 2
2 6 3 Yes 3
2 7 1 Yes 1
2 7 3 No 2
2 8 1 No 3
2 8 3 Yes 1
2 5 2 Yes 2
2 5 4 Yes 3
2 6 2 Yes 1
2 6 4 Yes 2
2 7 2 Yes 3
2 7 4 No 3
2 8 2 No 2
2 8 4 Yes 1
3 1 5 Yes 2
3 1 7 Yes 3
3 2 5 Yes 2
3 2 7 Yes 3
3 3 5 Yes 2
3 3 7 Yes 1
3 4 5 Yes 3
3 4 7 No 1
3 1 6 No 2
3 1 8 Yes 3
3 2 6 Yes 3
3 2 8 Yes 3
3 3 6 Yes 3
3 3 8 Yes 3
3 4 6 Yes 1
3 4 8 Yes 2
4 5 5 Yes 3
4 5 7 Yes 2
4 6 5 Yes 1
4 6 7 Yes 2
4 7 5 No 2
4 7 7 Yes 2
4 8 5 Yes 2
4 8 7 No 1
4 5 6 Yes 1
4 5 8 Yes 1
4 6 6 Yes 3
4 6 8 Yes 3
4 7 6 Yes 2
4 7 8 No 1
4 8 6 Yes 2
4 8 8 Yes 1
I want to see if the response variable 'Proper' after controling for age_level is affected by spaital location (lat lng) BETWEEN each block. I know GEE can do such analysis for clustered data. But GEE is doing 'within each block' analysis. I want to do between each block analysis.I looked various source of glimmix trying to figure out the code. The only code I can write is:
proc glimmix data=HessianFly1;
class Block proper age_level ;
model proper = age_level / solution;
random intercept /subject=Block type=sp(exp) (lng lat);
run;
The covariance result:
Covariance Parameter Estimates
Cov Parm Subject Estimate Standard Error
Variance SurveyID 0.03423 0.3277
SP(EXP) SurveyID 1.0000 .
But I am wondering if it is doing the right thing for me. I don't see how the code is working. I thought the 'subject=Block' is assuming obsverations from a give block are correlated based on the spatial covariance structure type=sp(exp) (lng lat), but observations in this block are not correlated with observations from other blocks. That means it is still doing within block spatial analysis. Am I right? So, How to do the between block analysis with the sp(exp) (lng lat) covariance structure?
Your reply will be highly appreciated!
Best
czqiu
I have a dataset which contains 4 block, each block has 16 observations with made up latitude longitude with one dummy varible(proper:yes no) and age levels variable.
Block lat lng proper $ age_level
1 1 1 Yes 1
1 1 3 No 2
1 2 1 No 3
1 2 3 Yes 2
1 3 1 Yes 3
1 3 3 Yes 1
1 4 1 Yes 1
1 4 3 Yes 1
1 1 2 Yes 1
1 1 4 Yes 3
1 2 2 No 2
1 2 4 Yes 1
1 3 2 Yes 3
1 3 4 Yes 3
1 4 2 Yes 3
1 4 4 Yes 1
2 5 1 No 2
2 5 3 No 3
2 6 1 Yes 2
2 6 3 Yes 3
2 7 1 Yes 1
2 7 3 No 2
2 8 1 No 3
2 8 3 Yes 1
2 5 2 Yes 2
2 5 4 Yes 3
2 6 2 Yes 1
2 6 4 Yes 2
2 7 2 Yes 3
2 7 4 No 3
2 8 2 No 2
2 8 4 Yes 1
3 1 5 Yes 2
3 1 7 Yes 3
3 2 5 Yes 2
3 2 7 Yes 3
3 3 5 Yes 2
3 3 7 Yes 1
3 4 5 Yes 3
3 4 7 No 1
3 1 6 No 2
3 1 8 Yes 3
3 2 6 Yes 3
3 2 8 Yes 3
3 3 6 Yes 3
3 3 8 Yes 3
3 4 6 Yes 1
3 4 8 Yes 2
4 5 5 Yes 3
4 5 7 Yes 2
4 6 5 Yes 1
4 6 7 Yes 2
4 7 5 No 2
4 7 7 Yes 2
4 8 5 Yes 2
4 8 7 No 1
4 5 6 Yes 1
4 5 8 Yes 1
4 6 6 Yes 3
4 6 8 Yes 3
4 7 6 Yes 2
4 7 8 No 1
4 8 6 Yes 2
4 8 8 Yes 1
I want to see if the response variable 'Proper' after controling for age_level is affected by spaital location (lat lng) BETWEEN each block. I know GEE can do such analysis for clustered data. But GEE is doing 'within each block' analysis. I want to do between each block analysis.I looked various source of glimmix trying to figure out the code. The only code I can write is:
proc glimmix data=HessianFly1;
class Block proper age_level ;
model proper = age_level / solution;
random intercept /subject=Block type=sp(exp) (lng lat);
run;
The covariance result:
Covariance Parameter Estimates
Cov Parm Subject Estimate Standard Error
Variance SurveyID 0.03423 0.3277
SP(EXP) SurveyID 1.0000 .
But I am wondering if it is doing the right thing for me. I don't see how the code is working. I thought the 'subject=Block' is assuming obsverations from a give block are correlated based on the spatial covariance structure type=sp(exp) (lng lat), but observations in this block are not correlated with observations from other blocks. That means it is still doing within block spatial analysis. Am I right? So, How to do the between block analysis with the sp(exp) (lng lat) covariance structure?
Your reply will be highly appreciated!
Best
czqiu