Hi every one
please help me with my problem.
I have the model that estimated by proc nlmixed then i need to plot the actual and predicted.
proc import datafile='C:\Users\Abbas Arkawazi\Desktop\test.xlsx'
DBMS =xlsx Out=test;
run;
proc nlmixed data=test;
parms b0= 10 b1=2 b2=.5 b3= 1 a=2 b=1 s= 150 ;
m = b0+(b1*age)+(b2*gender)+(b3*creatin);
y=urea;
if status_u=1 then f=((a*b)*((1-exp(-exp((y-m)/s)))**(a-1))*((1+((exp(exp((y-m)/s))-1)**(a)))**(-(b+1)))) /(s*exp((-a*exp((y-m)/s))-((y-m)/s))) ;
else f= (1+(((1-exp(-exp((y-m)/s)))/(exp(-exp((y-m)/s))))**a))**-b ;
ll=log(f);
model y ~ general(ll);
run;
please help me to plot the estimated model
thank u very much
@Reeza is right. Use the PREDICT statement to generate your predicted values. If M is your mean response, then PREDICT M will get you that predicted value.
You have 3 covariates in the model though. I am not sure what you will want to use as the X axis for your plot. Perhaps group by GENDER and plot either CREATIN or AGE for a specific value of AGE or CREATIN.
The PREDICT statement will provide predicted values for the observations in your DATA= data set, the input to PROC NLMIXED. To create predicted values for additional observations, you will need to write your own scoring code in a SAS Data step. Your equation for M in your PROC NLMIXED code is your scoring equation. Substitute the parameter estimates from NLMIXED and off you go.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.