Obsidian | Level 7

## Plotting a response var against 18 independent variables

Hi All,

I have data of an experiment that has one response variable "growth" related to 18 treatments (TRT) that were measured for eight weeks with three replications.

The statistical model for analysis looks like this:

(Data is sorted by rep trt and time)

proc mixed data=combine;
class rep trt time;
model growth=trt|time / ddfm=kr;
random rep;
repeated /type= AR (1) subject=trt;
lsmeans trt*time;
run;

The program runs without error. I would like now to plot every treatment against a specific time interval. I don't have much skill with SAS but eager to learn. Please suggest some me a few program codes to do this. Thank you.

Fridge

3 REPLIES 3
Super User

## Re: Plotting a response var against 18 independent variables

for something that you think may show what you want. Without have a better idea of what you actually want or makes sense for your data it is difficult to make targeted suggestions.

Obsidian | Level 7

## Re: Plotting a response var against 18 independent variables

Hi Ballardw,
Thank you very much for your reply. I guess I didn't explain clearly what I intend to do with my data. I am trying again.
Rep

trt

Week1

Week2

Week3

Week4

Week5

Week6

Week7

Week8

1-3

1-18

X cm

X cm

X cm

X cm

X cm

X cm

X cm

X cm

I have measured growth (x cm) of 18 treatments (trt) (genotypes) for eight weeks (time).

The statistical model for analysis is:

1) proc mixed data=combine;class rep trt time; model growth=trt|time / ddfm=kr; random rep;
repeated /type= AR (1) subject=trt;
lsmeans trt*time;
run;

2) proc gplot data=combine; plot growth*time=trt; run;

3) I want to graphically view the data (The data is sorted by rep trt and time). The step-2 gives me a messy output. The question is how can I view or compare all treatments' effect using lsmeans at a particular time interval (say week5)?
Looking forward to hearing from you. Please, feel free to ask any question that you may have.
Sincerely
Nasir

SAS Super FREQ

## Re: Plotting a response var against 18 independent variables

You can try to create an effect plot. See the article "Use the EFFECTPLOT statement to visualize regression models in SAS."

A sketch of what you want would enable us to   give more specific advice. You can sketch it on a piece of paper and then take a picture or scan it into an image file.

Discussion stats
• 3 replies
• 835 views
• 0 likes
• 3 in conversation