BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
PamG
Quartz | Level 8

I am using a PROC NLIN code that is supposed to add results from the PUT statement given below.  I am not seeing the results of the PUT in either the output or the log window.  I am running the same code on my data and I need to know the point of inflection.  A sample code is given below which comes from the SAS website.

 

 

data a;
input y x @@;
datalines;
.46 1 .47 2 .57 3 .61 4 .62 5 .68 6 .69 7
.78 8 .70 9 .74 10 .77 11 .78 12 .74 13 .80 13
.80 15 .78 16
;

ODS GRAPHICS ON;
title 'Quadratic Model with Plateau';
proc nlin data=a;
parms alpha=.45 beta=.05 gamma=-.0025;

x0 = -.5*beta / gamma;

if (x < x0) then
mean = alpha + beta*x + gamma*x*x;
else mean = alpha + beta*x0 + gamma*x0*x0;
model y = mean;

if _obs_=1 and _iter_ =. then do;
plateau =alpha + beta*x0 + gamma*x0*x0;
put / x0= plateau= ;  **gives point of inflection;
end;
output out=b predicted=yp;
run;title;

https://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_nlin_exampl...

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @PamG,

 

On my computer, using listing output, the PUT statement in the PROC NLIN step writes to the output window. If I insert

file log;

before the PUT statement, it writes to the log window.

View solution in original post

3 REPLIES 3
FreelanceReinh
Jade | Level 19

Hello @PamG,

 

On my computer, using listing output, the PUT statement in the PROC NLIN step writes to the output window. If I insert

file log;

before the PUT statement, it writes to the log window.

PamG
Quartz | Level 8
Thanks you so much @FreelanceReinh. I am using SAS EG and I cannot see the output in pdf and HTML outputs. I do see it in the listing window which is don't use. The file log worked. Thank you!!!
Quentin
Super User

When I run your code I do se the results of the PUT statement at the end of the output:

 

                                          The NLIN Procedure

                                   Approximate Correlation Matrix
                                        alpha            beta           gamma

                        alpha       1.0000000      -0.9020250       0.8124327
                        beta       -0.9020250       1.0000000      -0.9787952
                        gamma       0.8124327      -0.9787952       1.0000000

x0=12.747669162 plateau=0.7774974276
BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 455 views
  • 1 like
  • 3 in conversation