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

I'm trying to produce a slicefit type plot and want to specify values for the sliceby variable.

 

Outcome is a binary outcome (0/1). Variable1 and Variable2 are both continuous variables.

 

The code below produces exactly what I want except for one small issue: I'd like to set the values for sliceby=variable2 to be like 20, 40, 60, etc., not the 15.66, 36.36, 57.06, etc. that are being chosen automatically.

 

I have tried to use AT to specify values but can't get the result I want. The sliceby values are still the ones chosen automatically.

 

proc logistic data=my_dataset PLOTS(ONLY) = EFFECT(showobs);
	model outcome = variable1 variable2 variable1*variable2 / rsquare;
    effectplot slicefit (x=variable1 sliceby=variable2)
   	 / noobs
	;
run;

SliceFitPlot.png

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
sliceby=variable2=20 40 60 80 100

 

Something like that should work for you.

 

https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html

 


@ljlynn97 wrote:

I'm trying to produce a slicefit type plot and want to specify values for the sliceby variable.

 

Outcome is a binary outcome (0/1). Variable1 and Variable2 are both continuous variables.

 

The code below produces exactly what I want except for one small issue: I'd like to set the values for sliceby=variable2 to be like 20, 40, 60, etc., not the 15.66, 36.36, 57.06, etc. that are being chosen automatically.

 

I have tried to use AT to specify values but can't get the result I want. The sliceby values are still the ones chosen automatically.

 

proc logistic data=my_dataset PLOTS(ONLY) = EFFECT(showobs);
	model outcome = variable1 variable2 variable1*variable2 / rsquare;
    effectplot slicefit (x=variable1 sliceby=variable2)
   	 / noobs
	;
run;

SliceFitPlot.png


 

View solution in original post

2 REPLIES 2
Reeza
Super User
sliceby=variable2=20 40 60 80 100

 

Something like that should work for you.

 

https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html

 


@ljlynn97 wrote:

I'm trying to produce a slicefit type plot and want to specify values for the sliceby variable.

 

Outcome is a binary outcome (0/1). Variable1 and Variable2 are both continuous variables.

 

The code below produces exactly what I want except for one small issue: I'd like to set the values for sliceby=variable2 to be like 20, 40, 60, etc., not the 15.66, 36.36, 57.06, etc. that are being chosen automatically.

 

I have tried to use AT to specify values but can't get the result I want. The sliceby values are still the ones chosen automatically.

 

proc logistic data=my_dataset PLOTS(ONLY) = EFFECT(showobs);
	model outcome = variable1 variable2 variable1*variable2 / rsquare;
    effectplot slicefit (x=variable1 sliceby=variable2)
   	 / noobs
	;
run;

SliceFitPlot.png


 

ljlynn97
Fluorite | Level 6
Yes, thank you! I knew it had to be something simple. And thanks for the link, I'll add it to my collection.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 510 views
  • 2 likes
  • 2 in conversation