Hello,
I am not familiar with the spline procedures. The goal I intend to achieve is to draw a spline-line graph, with a response variable as the Y-axis together with its confidence interval, and an independent variable as the X-axis changes continuously. However, the model has more than one independent variable. So, where should I start from scratch? Thank you.
PROC ADAPTIVEREG will get you started. This simple example should help ODS Graphics and PROC ADAPTIVEREG
Hello, everyone
Today I learned the PROC TRANSREG could be used to draw spline, e.g.,
ods graphics on; proc transreg data=d202ps_4; model identity(addMg) = spline(serumAlb); run;
However, my linear regression model should include many other independent variables. I tried to add them to the PROC TRANSREG but it did not work as I expected. Does anyone know how to solve this issue (spline with other variables adjusted)?
Thanks
Hmmm, thanks. The EFFECTPLOT statement is powerful. However, I don't understand one thing.
proc logistic data=d202ps_3; class obesity_status(REF='0') genderC(REF='0') AF(REF='0') Hypertension(REF='0') CHF(REF='0') akiC(ref='0') ddiC(REF='0') indicationC(REF='0') CYP2C9code(REF='0') VKORC1Code(REF='0'); model firstInrAttain(event='1') = obesity_status Weight__kg_ ageY genderC AF Hypertension CHF serumAlb akiC ddiC indicationC CYP2C9code VKORC1Code / clodds=both clparm=both; effectplot slicefit(x=ageY sliceby=obesity_status=0 1 2) / clm noobs; run;
and
proc logistic data=d202ps_3; class /*obesity_status(REF='0')*/ genderC(REF='0') AF(REF='0') Hypertension(REF='0') CHF(REF='0') akiC(ref='0') ddiC(REF='0') indicationC(REF='0') CYP2C9code(REF='0') VKORC1Code(REF='0'); model firstInrAttain(event='1') = obesity_status Weight__kg_ ageY genderC AF Hypertension CHF serumAlb akiC ddiC indicationC CYP2C9code VKORC1Code / clodds=both clparm=both; effectplot slicefit(x=ageY sliceby=obesity_status=0 1 2) / clm noobs; run;
The two produced obviously different graphs. The only difference in the code is whether obesity_status was listed as class/category variable. Also, if I treat obesity_status as a class variable, I cannot define its levels in the EFFECTPLOT analysis (i.e., it has 4 levels but I prefer to use only three levels.) Thanks.
See this doc example: PROC LOGISTIC EFFECTPLOT Statement with CLASS variable . This shows how to use a CLASS variable as the SLICEBY= effect on the EFFETPLOT statement. You do not specify the levels of the CLASS effect here.
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!
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.