Hi,
I want to create subset of data based on one level of independent variable. I have used the following code to create subset of the data but it didn't work.
data spring07; set soils;
if crop = corn then delete;
run;
Is there any way to model with variable ne (^=). I did try but it is not working.
My second question is to calculate weighted means based on depths from that particular subset of data. I want to get weighted means of Phos variable based on depth as per following formula
Phos(weighted0-40) = (5*Phos1 + 5*Phos2 + 10*Phos3 + 20*Phos4)/40.
Phos(weighted0-20) = (5*Phos1 + 5*Phos2 + 10*Phos3)/20.
I don't know how I can do that because data has different other variables like Tillplc, Prate, Krate, and sampling location (in-row and between row).
Thanks, in advance!
Bhupinder