BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sam1231
Obsidian | Level 7

ods output ModelANOVA=varout(where=(Effect="avgsbp_S"));
proc phreg data=Master;
effect avgsbp_S = spline(avgsbp / basis=tpf(noint) NATURALCUBIC details knotmethod=percentiles(5) );
model time*event(0)=avgsbp_S tavr bmi nyha34 pvd hoxy atrial cirrh immunth gait live stro30 ltbld mjbld aki mi30
/ rl=wald ties=EFRON ;
store coxspline;

run;

 

modelanova output is not working.

 

WARNING: Output 'ModelANOVA' was not created. Make sure that the output
object name, label, or path is spelled correctly. Also, verify
that the appropriate procedure options are used to produce the
requested output object. For example, verify that the NOPRINT
option is not used.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

MODELANOVA indicates it needs a MODEL and possibly a CLASS statement. 

 

Otherwise as indicated by @PeterClemmensen you do need to see the MODELANOVA table name in the output. If you don't then it's not one of the output table names and you cannot store it. 

The documentation does list all table names and what options you need to get that information. 

 

If you're doing anything bayesian for example, it's not even listed as an output table. 

 

http://documentation.sas.com/?docsetId=statug&docsetTarget=statug_phreg_details211.htm&docsetVersion...

 


@sam1231 wrote:

I am not getting warning message because i comment out ods output option.

But when i use ods modelanova i am getting same warning message. 

ods trace on;
/*ods output ModelANOVA=modelanova;*/
proc phreg data=out.Master;
    effect avgsbp_S = spline(avgsbp / basis=tpf(noint) NATURALCUBIC details knotmethod=percentiles(5) );
    model time*event(0)=avgsbp_S tavr  bmi nyha34 pvd hoxy atrial cirrh immunth gait live stro30 ltbld mjbld aki mi30  
                       / rl=wald ties=EFRON ;
    store coxspline;
	   
run;
ods trace off;

 

View solution in original post

14 REPLIES 14
PeterClemmensen
Tourmaline | Level 20

1. Make sure that your procedure actually creates an output named ModelANOVA. You can verify this by wrapping your code in ODS TRACE ON/OFF like this

 

ods trace on;
proc phreg data=Master;
effect avgsbp_S = spline(avgsbp / basis=tpf(noint) NATURALCUBIC details knotmethod=percentiles(5) );
model time*event(0)=avgsbp_S tavr bmi nyha34 pvd hoxy atrial cirrh immunth gait live stro30 ltbld mjbld aki mi30
/ rl=wald ties=EFRON ;
store coxspline;
run;
ods trace off;

Does the ModelANOVA appear in the log? If not, then you found your problem. 

 

2. I don't think the ODS OUTPUT Statement supports data set options like the where= option. Try to simply output the data without any data set options. Then modify the data once it is there.

sam1231
Obsidian | Level 7

its not working:-(

i tried ods trace on/off but i am not able to output dataset . i removed where conditioned too


PeterClemmensen
Tourmaline | Level 20

And the ModelANOVA part is there? Please post the code you use now?

 

Still the same error message?

sam1231
Obsidian | Level 7

I am not getting warning message because i comment out ods output option.

But when i use ods modelanova i am getting same warning message. 

ods trace on;
/*ods output ModelANOVA=modelanova;*/
proc phreg data=out.Master;
    effect avgsbp_S = spline(avgsbp / basis=tpf(noint) NATURALCUBIC details knotmethod=percentiles(5) );
    model time*event(0)=avgsbp_S tavr  bmi nyha34 pvd hoxy atrial cirrh immunth gait live stro30 ltbld mjbld aki mi30  
                       / rl=wald ties=EFRON ;
    store coxspline;
	   
run;
ods trace off;
PeterClemmensen
Tourmaline | Level 20

Yes, but when you run the PHREG Procedure with ODS TRACE ON/OFF wrapped around it, do you see the ModelANOVA output being described in the log?

 

For example, when I run

 

ods trace on;
proc reg data=Sashelp.Cars plots=none;
   model Horsepower = EngineSize Weight;
quit;
ods trace off;

I see a list of all the output 'Blocks' that the procedure outputs like this

Capture.PNG

sam1231
Obsidian | Level 7

thanks for explanation.

 

I dont see modelanova output name in log 

PeterClemmensen
Tourmaline | Level 20

Then that is your problem. You are trying to build a data set from an output that does not exist. The names you see in the log are all the names of output 'blocks' that you can write to SAS data sets with the ODS OUTPUT Statement. 

 

Did you write this code yourself? How did ModelANOVA get there?

PeterClemmensen
Tourmaline | Level 20

Ah, I see. I am not an expert in PROC PHREG myself. But it seems that if you use the TYPE3 option in the model statement, the procedure will output the ModelANOVA block. So, I suspect this code will work

 

ods output ModelANOVA=ModelANOVA;
proc phreg data=out.Master;
    effect avgsbp_S = spline(avgsbp / basis=tpf(noint) NATURALCUBIC details knotmethod=percentiles(5) );
    model time*event(0)=avgsbp_S tavr  bmi nyha34 pvd hoxy atrial cirrh immunth gait live stro30 ltbld mjbld aki mi30 / rl=wald ties=EFRON type3;
    store coxspline;
	   
run;
sam1231
Obsidian | Level 7

thank you!

it give me p value on output editor but ods output modelanova not working.

Any other option?

PeterClemmensen
Tourmaline | Level 20

If the p-value is in the output editor or results viewer, then it is in the generated data set as well. 

 

Please compare the generated data set with the output block labelled "Type 3 Tests".

Reeza
Super User

MODELANOVA indicates it needs a MODEL and possibly a CLASS statement. 

 

Otherwise as indicated by @PeterClemmensen you do need to see the MODELANOVA table name in the output. If you don't then it's not one of the output table names and you cannot store it. 

The documentation does list all table names and what options you need to get that information. 

 

If you're doing anything bayesian for example, it's not even listed as an output table. 

 

http://documentation.sas.com/?docsetId=statug&docsetTarget=statug_phreg_details211.htm&docsetVersion...

 


@sam1231 wrote:

I am not getting warning message because i comment out ods output option.

But when i use ods modelanova i am getting same warning message. 

ods trace on;
/*ods output ModelANOVA=modelanova;*/
proc phreg data=out.Master;
    effect avgsbp_S = spline(avgsbp / basis=tpf(noint) NATURALCUBIC details knotmethod=percentiles(5) );
    model time*event(0)=avgsbp_S tavr  bmi nyha34 pvd hoxy atrial cirrh immunth gait live stro30 ltbld mjbld aki mi30  
                       / rl=wald ties=EFRON ;
    store coxspline;
	   
run;
ods trace off;

 

FreelanceReinh
Jade | Level 19

@sam1231 wrote:

 

WARNING: Output 'ModelANOVA' was not created. Make sure that the output
object name, label, or path is spelled correctly. Also, verify
that the appropriate procedure options are used to produce the
requested output object. For example, verify that the NOPRINT
option is not used.


Hi @sam1231,

 

The PROC PHREG documentation (see Details --> ODS Table Names) says that ModelANOVA requires the TYPE3 option of the MODEL statement or a CLASS statement, neither of which is used in your code. So, adding the TYPE3 option (after "EFRON") should help.

 

 

sam1231
Obsidian | Level 7

thank you!

it give me p value on output editor but ods output modelanova not working.

Any other option?

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 14 replies
  • 3228 views
  • 0 likes
  • 4 in conversation