Programming the statistical procedures from SAS

proc gampl logistic regression splines adjusted model

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 77
Accepted Solution

proc gampl logistic regression splines adjusted model

Having trouble with creating a fully adjusted logistic model using proc gampl at this stage:

 

We were trying to get a smoothed out spline figure for the adjusted model...

 

This is the error message:

NOTE: The SAS System stopped processing this step because of errors.
75 id Ind_DBP1 Vent__240;
76 model Vent__240(reference ='0') = spline(Ind_DBP1) spline(age)
77 Sex_num Redo1 NIDDM1 COPD Hyperlip CHF Afib CM CAD MI AICD DDRF PVD BB Steroids Amio AA1 Statin1 Nitrates1 Diurectics1
 
 
77 ! IABP_ever1
ERROR 22-322: Syntax error, expecting one of the following: ;, /, PARAM, SPLINE.
ERROR 76-322: Syntax error, statement will be ignored.
78 Age pre_Na pre_BUN pre_Cr pre_Gluc pre_PTT pre_Neutr o pre_Lymph pre_Hgb
79 / dist=binary;
80 output out = spline3age upper = u lower = l predicted = fit;
81 run;
82
83 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
ERROR: Calling global tagset function 'detach_stream':
Out of space writing to file /tmp/SAS_workB8270000F42E_localhost.localdomain/#LN01123.
 
 
 
 

title "Age as covariate";
proc  data = forgampl3;
id Ind_DBP1 Vent__240;
model Vent__240(reference ='0') = spline(Ind_DBP1) spline(age)
Sex_num Redo1 NIDDM1 COPD Hyperlip CHF Afib CM CAD MI AICD DDRF PVD BB Steroids Amio AA1 Statin1 Nitrates1 Diurectics1 IABP_ever1
Age pre_Na pre_BUN pre_Cr pre_Gluc pre_PTT pre_Neutr o pre_Lymph pre_Hgb
/ dist=binary;
output out = spline3age upper = u lower = l predicted = fit;
run;


Accepted Solutions
Solution
‎02-09-2018 12:19 PM
SAS Employee
Posts: 372

Re: proc gampl logistic regression splines adjusted model

Posted in reply to ChristosK
All of your predictors must be either in PARAM( ) or in SPLINE( ). None can be listed outside of one of those. Also, I assume your code actually says "proc gampl data=forgampl3" and that you didn't leave out "gampl".

View solution in original post


All Replies
Frequent Contributor
Posts: 77

Re: proc gampl logistic regression splines adjusted model

Posted in reply to ChristosK

The only thing I just tried was adding param (   ) to the covariates in the proc gampl statement.

Any thoughts?

 

param (
Redo1 NIDDM1 COPD Hyperlip CHF Afib CM CAD MI AICD DDRF PVD BB Steroids Amio AA1 Statin1 Nitrates1 Diurectics1 IABP_ever1
/* Age pre_Na pre_BUN pre_Cr pre_Gluc pre_PTT pre_Neutro pre_Lymph pre_Hgb */
)

Solution
‎02-09-2018 12:19 PM
SAS Employee
Posts: 372

Re: proc gampl logistic regression splines adjusted model

Posted in reply to ChristosK
All of your predictors must be either in PARAM( ) or in SPLINE( ). None can be listed outside of one of those. Also, I assume your code actually says "proc gampl data=forgampl3" and that you didn't leave out "gampl".
Highlighted
Frequent Contributor
Posts: 77

Re: proc gampl logistic regression splines adjusted model

Posted in reply to StatDave_sas

Thanks Steve.

Yes it does. I had uploaded the code I had used in my original question but do not see it there now.

That happens alot when I start a new thread. It takes several attempts to get it to actually post.

 

Much appreciated.

 

Christos 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 174 views
  • 0 likes
  • 2 in conversation