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

As the Subject line says, I'm getting an error in Proc PLM telling me that: "A data set is required to produce effect plots for your model". Insofar as I know, I've given it a dataset in the store??

 

This isn't exactly a huge issue, as I can run all the Effectsplots within the model statement. However, it'd be nice not to have to re-run the model every time I'd like to look at a different plot ^_^

 

Any insight into the issue (or glaring errors in my syntax) is greatly appreciated!!

 

Thanks!

 

Below is the code I'm using:

proc genmod data=clabsi;
class hiin region year_num;
model numerator = hiin|region|year_num/ dist=nb link=log offset=ln_days type3;
store work.clabsiNB;
run;

proc plm restore=clabsiNB;
	effectplot interaction(x=region sliceby=hiin) / clm connect;
	effectplot interaction(x=hiin sliceby=region) / clm connect;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
MichaelL_SAS
SAS Employee

Good question. The item store you provide as input to PROC PLM contains a summary of a statistical model that can be used to perform post-fitting statistical analyses. The item store does not save the observations that were used to fit the statistical model and is different than a SAS data set. This gets discussed in the Basic Features section of the PROC PLM documentation.

 

For your example I believe the reason you are getting the ERROR about needing a data set to produce the effect plot is because your model contains an offset variable. For models with an offset variable the EFFECTPLOT statement will compute predicted values only at the observation values unless the NOOFFSET option is specified. There is a note mentioning this is the detailed documentation for the EFFECTPLOT statement  in the Shared Concepts and Topics chapter. 

View solution in original post

4 REPLIES 4
Amitpsingh1
Calcite | Level 5
I think you should not select work folder to store the dataset as it gets
deleted upon closing of the session.
lkeyes
Obsidian | Level 7

You are correct! If this were a production level project, I would most definitely want to save this in a directory that wasn't wiped after every session. However, this happens to be more "free-time modeling", and I'm not worried about loosing anything except the actual SAS file. 

 

To my point, though, even if i did save the model into a non-work directory, I still wouldn't be able to run the Effectplot as PLM keeps giving me the: "A data set is required to produce Effect plots for your model" error =/

 

Either way, thank you for sharing your advice!!

MichaelL_SAS
SAS Employee

Good question. The item store you provide as input to PROC PLM contains a summary of a statistical model that can be used to perform post-fitting statistical analyses. The item store does not save the observations that were used to fit the statistical model and is different than a SAS data set. This gets discussed in the Basic Features section of the PROC PLM documentation.

 

For your example I believe the reason you are getting the ERROR about needing a data set to produce the effect plot is because your model contains an offset variable. For models with an offset variable the EFFECTPLOT statement will compute predicted values only at the observation values unless the NOOFFSET option is specified. There is a note mentioning this is the detailed documentation for the EFFECTPLOT statement  in the Shared Concepts and Topics chapter. 

lkeyes
Obsidian | Level 7

@MichaelL_SAS Thank you so much!! That totally makes sense, and works. Also, thanks for the reference material

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!

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
  • 4 replies
  • 1267 views
  • 3 likes
  • 3 in conversation