SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
fridge
Calcite | Level 5

Hi All,

 

I have data of an experiment on which I started working on for my own learning. The objective of the experiment is to investigate the effect of row spacing on grain moisture content that was measured in a 2x2 factorial (four replications) where each treatment (variety and row spacing) was measured weekly for grain moisture content till harvest.

 

I think the data/exp fits for repeated measure analysis? Following is the model:

options linesize=78;
Data moisture;
Input variety$ row_spac Block Week_1 to Week_10;
datalines;

VarietyRow_SpacBlockWeek_1Week_2Week_3Week_4Week_5Week_6Week_7Week_8Week_9Week_10
Variety_A30168.3365.0858.4254.4251.2544.9240.0831.5026.2517.56
Variety_A60167.5865.3361.0858.5855.8352.5046.7539.4227.1718.10
Variety_A22169.0865.5059.3355.0851.1745.9238.6733.3329.0017.00
Variety_A15171.5067.3364.2560.5052.4242.7539.9235.1729.5816.89
Variety_B30167.0062.6758.6754.8353.1746.8339.5831.6726.8319.30
Variety_B60164.6761.1758.5854.6755.0050.9243.0034.9232.4219.20
Variety_B22167.4262.1759.6755.2551.1744.5038.5834.2527.8317.60
Variety_B15166.8367.2563.0062.6751.0847.2538.2531.6729.5018.90
Variety_A152          
Variety_A222          

proc glm data=moisture;

class variety row_spac;
model Week_1 to Week_10 = row_spac|variety;
repeated time 10;
lsmeans row_spac variety;
run;

 

Please, suggest/comment advise on the sas model. I have tried running this model with some modifications but I do not get correct df (320-1). I must be making a mistake that I do not realize.Thank you.

 

1 REPLY 1
cici0017
SAS Employee

Rpeated measures is suggested to use PROC MIXED procedure, see the example in the documentation-

http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_mixed_exampl...

 

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 954 views
  • 0 likes
  • 2 in conversation