BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MaryA_Marion
Lapis Lazuli | Level 10

SAS 9.4 TS LEVEL 1M3

 

Hello,I am having difficulty with outest statement and reference to new (?) dataset koko.  Please see error message below. I think it should output the cov matrix of the parameter estimates? How to do?  Could it be a semicolon or statement placement problem?

 

proc NLIN data = eight
BEST= 10    
MAXITER= 100   
METHOD= Gauss 
CONVERGE=1.0E-6
LIST
ALPHA = 0.10;   
parms Beta1 = 0.05 Beta2 = 4;
parms
Beta1 = 0.753362 to 1.0 by 0.01
Beta2 = 0.53261;
der.Beta1 = exp(beta2 * x);
/* OUTEST = KOKO(where = (_TYPE_ = "COVB")); */
    model y = Beta1 * exp(Beta2 * x);
output
out = eightOut
p= y_hat
r= residual
stdr= SE_Resid
LCLM= LCL_Mean    
UCLM= UCL_Mean ;  
run; quit; title;
 
/*  error msg
OUTEST = KOKO(where = (_TYPE_ = "COVB"))
ERROR: Cannot find a library containing subroutine KOKO.
ERROR: no dependent variable specified.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.EIGHTOUT may be incomplete.  When this step was
         stopped there were 0 observations and 0 variables.
WARNING: Data set WORK.EIGHTOUT was not replaced because this step was stopped.
 
OUTEST=SAS-data-set
specifies an output data set that contains the parameter estimates produced at each iteration. 
See the section Output Data Sets for details.
*/
 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Option OUTEST belongs in the proc nlin statement.

 

proc NLIN data = eight
BEST= 10    
MAXITER= 100   
METHOD= Gauss 
CONVERGE=1.0E-6
LIST
ALPHA = 0.10
OUTEST = KOKO(where = (_TYPE_ = "COVB")); 
PG

View solution in original post

6 REPLIES 6
PGStats
Opal | Level 21

Option OUTEST belongs in the proc nlin statement.

 

proc NLIN data = eight
BEST= 10    
MAXITER= 100   
METHOD= Gauss 
CONVERGE=1.0E-6
LIST
ALPHA = 0.10
OUTEST = KOKO(where = (_TYPE_ = "COVB")); 
PG
MaryA_Marion
Lapis Lazuli | Level 10
Hello,

thank you for your reply. There are two problems.
1. koko does not exist
2. can I run multiple parms statements that preferrably are labelled?

Sincerely,
Mary

2. title2 "Non-Linear Regression y ~ X";
proc NLIN data = eight
BEST = 10
MAXITER = 100
METHOD = Gauss
CONVERGE=1.0E-6
LIST
ALPHA = 0.10
OUTEST = KOKO(where = (_TYPE_ = "COVB"));
parms Beta1 = 0.05 Beta2 = 4;
parms
Beta1 = 0.753362 to 1.0 by 0.01
Beta2 = 0.53261;
parms
Beta1 = 0.5 to 2.0 by 0.1
Beta2 = 0.53261;
der.Beta1 = exp(beta2 * x);
model y = Beta1 * exp(Beta2 * x);
output
out = eightOut
p = y_hat
r = residual
stdr = SE_Resid
LCLM = LCL_Mean
UCLM = UCL_Mean ;
run; quit; title;

##- Please type your reply above this line. Simple formatting, no
attachments. -##
ballardw
Super User

@MaryA_Marion wrote:
Hello,

thank you for your reply. There are two problems.
1. koko does not exist

OUTEST creates an output set. If you use the name of an existing data set the procedure will overwrite the existing set.

 

 

PGStats
Opal | Level 21

I don't think multiple parameter statements are allowed but you can list starting parameter values in a separate dataset. This should work:

 

title2 "Non-Linear Regression y ~ X";

data parameters;
parameter = "beta1"; estimate=0.05; output;
parameter = "beta2"; estimate=4; output;
parameter = "beta2"; estimate=0.53261; output;
parameter = "beta1";
    do estimate = 0.753362 to 1.0 by 0.01;
        output;
        end;
    do estimate = 0.5 to 2.0 by 0.1;
        output;
        end;
run;

proc NLIN data = eight
    BEST = 10
    MAXITER = 100
    METHOD = Gauss
    CONVERGE=1.0E-6
    LIST
    ALPHA = 0.10
    OUTEST = KOKO(where = (_TYPE_ = "COVB"));
parameters / pdata=parameters;
model y = Beta1 * exp(Beta2 * x);
output
    out = eightOut
    p = y_hat
    r = residual
    stdr = SE_Resid
    LCLM = LCL_Mean
    UCLM = UCL_Mean ;
run; quit; 
title;

(untested)

PG
MaryA_Marion
Lapis Lazuli | Level 10
All three did not appear on output. It may be safer to just run these one
at a time.

Mary

##- Please type your reply above this line. Simple formatting, no
attachments. -##
MaryA_Marion
Lapis Lazuli | Level 10

Your approach of using a dataset for the parms was clever. However I did not feel comfortable with the output from SAS. I was not completely sure which set of parameters I was using.  I am doing them one at a time now (3 runs of proc nlin).

 

As for koko, I have a SAS-win10 OS problem sometimes.  After many tries I finally got koko to print out.  proc nlin syntax is very sensitive.

 

Thank you for replying.

 

Mary

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 6 replies
  • 2196 views
  • 1 like
  • 3 in conversation