BookmarkSubscribeRSS Feed
magwoodj
Calcite | Level 5

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;

4 REPLIES 4
Reeza
Super User

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;

magwoodj
Calcite | Level 5

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?

PaigeMiller
Diamond | Level 26

@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
PaigeMiller
Diamond | Level 26

No observation has a value for both compmeas and coachtype

--
Paige Miller

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
  • 3711 views
  • 0 likes
  • 3 in conversation