Prev: Has somebody yet implemented the NBD-Pareto-model in SAS?
Next: Has somebody yet implemented the NBD-Pareto-model in SAS?
From: nuria on 5 Jul 2010 14:51 Hi, I have a dataset from a survey carried out in different farms (roughly 100 farms). On each farm, different measures were taken from a sample of cows (roughly 50), so I have a bunch of cow level variables such body weight, age, etc... I also have herd level variables: type of flooring, type of housing, etc... I have some continuous dependant variables such as milk production measured at the cow level that I want to analyze. Can I just run a PROC MIXED with farm as a random effect, and add all the cow-level and farm-level independent variables in the model? It strikes me that since there would be as many observations in the dataset as cows, cow would be considered as the experimental unit and therefore, pseudoreplication would be a problem to test the effect of farm-level variables on milk production and the rest of variables.... Am I right? Thanks in advance!
From: kvasikonkav on 5 Jul 2010 17:01
On Jul 5, 1:51 pm, nuria <nchapi...(a)yahoo.com> wrote: > Hi, > > I have a dataset from a survey carried out in different farms (roughly > 100 farms). On each farm, different measures were taken from a sample > of cows (roughly 50), so I have a bunch of cow level variables such > body weight, age, etc... I also have herd level variables: type of > flooring, type of housing, etc... > I have some continuous dependant variables such as milk production > measured at the cow level that I want to analyze. Can I just run a > PROC MIXED with farm as a random effect, and add all the cow-level and > farm-level independent variables in the model? It strikes me that > since there would be as many observations in the dataset as cows, cow > would be considered as the experimental unit and therefore, > pseudoreplication would be a problem to test the effect of farm-level > variables on milk production and the rest of variables.... Am I right? > > Thanks in advance! Try running proc surveyreg. It can produce standard errors which are robust to within-cluster correlation. sample code for this: proc surveyreg data=cows01; cluster farm; model milkproduction = bodyweight age; if you have errors that are clustered on more than one dimension, then it is harder to do, since there is no stock procedure to do this. HTH |