Help using Base SAS procedures

Proc Mixed: specifying random effects

Reply
N/A
Posts: 1

Proc Mixed: specifying random effects

Hello All,

I have gone through the literature and looked at some examples of mixed modeling but I am not sure if the code I have specified the random effects is correct and efficient. Any advice would be appreciated.

The goal of the study was to look for evidence of spatial correlation of organism counts (1 species) from trees (subjects) planted on a grid (rows by column). To make things simple I transformed the data to follow a normal distribution using a suggested box-cox transformation. I am aware that more appropriate modeling of the counts probably requires using poisson/negbin regression next but I need to work up to that (I will try proc glimmix next). 

Each tree was divided into four quadrants (N, E, S, W) and for each quadrant 2 leaves were sampled (a total of 8 leaves per tree).

The response variable, y, refers to the transformed counts. The fixed effects are leaf length (x1) and quadrant (x2). The random effects I want explore are those due to the tree and tree*quadrant interaction. I have written the code below but I am not sure if this is appropriate. I am still confused by when to use the repeated and random statement.

proc mixed data=mydata method=REML;

class quadrant tree;

model Y = quadrant length/solution;

lsmeans quadrant/adjust=bon pdiff=all;

random quadrant*tree;

random tree/type=sp(exp)(column row);

run;

Thanks in advance,

Rick

Ask a Question
Discussion stats
  • 0 replies
  • 133 views
  • 0 likes
  • 1 in conversation