Hi guys, i'm relatively new with sas and i have this data set to analyze but I don't know how to go about it. I hope to get help here. i am trying to use a model to predict growth using three different planting techniques. The data is written below:
Block | Treatment | Height (ft) | Weight (g) | GLD (in) |
1 | Fever | 5.29 | 337.7 | 32.2 |
1 | Fever | 8.21 | 1002.07 | 56.4 |
1 | Fever | 3.5 | 140.4 | 20.2 |
1 | Control | 5.875 | 346.19 | 39.41 |
1 | Control | 2.54 | 52.72 | 15.32 |
1 | Control | 4.04 | 172.41 | 26.35 |
1 | Scramble | 3.41 | 172.08 | 24.5 |
1 | Scramble | 4.87 | 203.65 | 27.1 |
1 | Scramble | 3.75 | 162.29 | 24.5 |
2 | Fever | 5.54 | 345.41 | 34.75 |
2 | Fever | 7.25 | 796.15 | 49.29 |
2 | Fever | 3 | 154.13 | 22.99 |
2 | Control | 3.81 | 217.09 | 27.1 |
2 | Control | 4.29 | 195.8 | 25.55 |
2 | Control | 4.9 | 167.18 | 25.5 |
2 | Scramble | 3.08 | 52.69 | 15.7 |
2 | Scramble | 5.58 | 374.04 | 39.25 |
2 | Scramble | 2.33 | 40.45 | 11.9 |
3 | Fever | 6.21 | 547.04 | 44.5 |
3 | Fever | 6.58 | 249.21 | 32 |
3 | Fever | 4.68 | 184.06 | 26.5 |
3 | Control | 7.1 | 335.9 | 36.3 |
3 | Control | 4.125 | 38.55 | 10.69 |
3 | Control | 4.58 | 201.48 | 25.65 |
3 | Scramble | 3.47 | 280.99 | 28.3 |
3 | Scramble | 3.1 | 117.84 | 16.8 |
3 | Scramble | 4.21 | 205.43 | 26.1 |
I have an idea of what the model should look like.
W= a(GLD) x Hb
Note: 'b' is a superscript
I hope someone can help me with the statement to use on the sas software.
Any question/recommendation is welcome. Thank you
If I understand you correct, PROC NLIN would be my first choice
data have;
input Block Treatment $ Height Weight GLD;
datalines;
1 Fever 5.29 337.7 32.2
1 Fever 8.21 1002.07 56.4
1 Fever 3.5 140.4 20.2
1 Control 5.875 346.19 39.41
1 Control 2.54 52.72 15.32
1 Control 4.04 172.41 26.35
1 Scramble 3.41 172.08 24.5
1 Scramble 4.87 203.65 27.1
1 Scramble 3.75 162.29 24.5
2 Fever 5.54 345.41 34.75
2 Fever 7.25 796.15 49.29
2 Fever 3 154.13 22.99
2 Control 3.81 217.09 27.1
2 Control 4.29 195.8 25.55
2 Control 4.9 167.18 25.5
2 Scramble 3.08 52.69 15.7
2 Scramble 5.58 374.04 39.25
2 Scramble 2.33 40.45 11.9
3 Fever 6.21 547.04 44.5
3 Fever 6.58 249.21 32
3 Fever 4.68 184.06 26.5
3 Control 7.1 335.9 36.3
3 Control 4.125 38.55 10.69
3 Control 4.58 201.48 25.65
3 Scramble 3.47 280.99 28.3
3 Scramble 3.1 117.84 16.8
3 Scramble 4.21 205.43 26.1
;
proc nlin data=have list noitprint;
parms a 0 b 0;
model Weight = a*GLD + Height**b;
output out=ModelOut predicted=Pred;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.