BookmarkSubscribeRSS Feed
Qsz
Calcite | Level 5 Qsz
Calcite | Level 5

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:

 

BlockTreatmentHeight (ft)Weight (g)GLD (in)
1Fever5.29337.732.2
1Fever8.211002.0756.4
1Fever3.5140.420.2
1Control5.875346.1939.41
1Control2.5452.7215.32
1Control4.04172.4126.35
1Scramble3.41172.0824.5
1Scramble4.87203.6527.1
1Scramble3.75162.2924.5
2Fever5.54345.4134.75
2Fever7.25796.1549.29
2Fever3154.1322.99
2Control3.81217.0927.1
2Control4.29195.825.55
2Control4.9167.1825.5
2Scramble3.0852.6915.7
2Scramble5.58374.0439.25
2Scramble2.3340.4511.9
3Fever6.21547.0444.5
3Fever6.58249.2132
3Fever4.68184.0626.5
3Control7.1335.936.3
3Control4.12538.5510.69
3Control4.58201.4825.65
3Scramble3.47280.9928.3
3Scramble3.1117.8416.8
3Scramble4.21205.4326.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

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

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;
Reeza
Super User
The terms 'block' and 'treatment' make me think of PROC MIXED instead, and Design of Experiments.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1134 views
  • 2 likes
  • 3 in conversation