- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am getting the error:
ERROR: No valid observations due to invalid or missing values in the response, explanatory,
offset, frequency, or weight variable. in my proc genmod code. How can I fix this? I have merged my three data sets and just need to run the poisson regression. PLEASE HELP!!
data EightPUcompjuly;
input compmeas$ compliancerate ;
Datalines;
Turnclock 0.87
effectiveturns 0.37
bed 0.75
linenlayers 0.87
pressrelief 0.87
lowairloss 0.1
;
run;
data EightPUcoachjuly;
input coachtype$ comprate ;
Datalines;
BL 0.33
NL 0.50
PL 0.16
;
run;
data Eightharmsjuly;
input fall pus;
datalines;
0 3
;
run;
proc print data= eightharmsjuly; run;
data combined;
set EightPUcompjuly EightPUcoachjuly eightharmsjuly;
run;
proc print data = combined; run;
***8W compliance percentage based on rounds completed;
proc means data = combined n mean var min max;
var compliancerate comprate fall pus;
run;
proc means data = combined n mean var min max;
class compmeas;
var compliancerate comprate;
run;
proc freq data=combined;
tables compliancerate*coachtype / plots=freqplot;
run;
proc genmod data=combined;
class coachtype compmeas;
model compliancerate= coachtype fall pus compmeas /dist=poisson link=log;
;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Well, the error is correct. How you've combined your data generates missing for all values, so you need to fix your input data first.
We don't know how your data should be structured, so I can't comment on that. Post more details, for furhter help. Note that it's the data combination that's incorrect.
data combined;
set EightPUcompjuly EightPUcoachjuly eightharmsjuly;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The data does not align on a one-to-one basis but I am seeking to identify the relationship between the three variable using the Poisson. Was combining the datasets the best option to do this? How else should I combine?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@magwoodj wrote:
The data does not align on a one-to-one basis but I am seeking to identify the relationship between the three variable using the Poisson. Was combining the datasets the best option to do this? How else should I combine?
If the data does not align on a one-to-one basis ... then you cannot do this type of PROC GENMOD analysis; nor can I think of any other way to do this ananlysis.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
No observation has a value for both compmeas and coachtype
Paige Miller