Help using Base SAS procedures

Strata for test population for proc stdrate must be positive?

Reply
Learner
Posts: 1

Strata for test population for proc stdrate must be positive?

[ Edited ]

I'm trying to calculate standard morbidity rates (SMRs). I have the population and number of cases for my test population and my reference population. My dataset has 180 demographic stratifications, so some populations in my small test population have a population of 0. When using the stdrate procedure, I'm returned with th error "The observation values for the TOTAL= variable in the POPULATION statement must be positive"

 

How do I get around this? Any help is appreviated. I've attached a dummy dataset and code, you can see the "w male 60+" strata has a 0 population in the test population.

 

Data example;
	set example;
run;

proc stdrate data=example refdata=example
		method=indirect
		stat=rate(mult=100000)
		plots=all;
	population event=ct1_cases total=ct1_pop;
	reference event=ref_cases total=ref_pop;
	strata strata / stats smr;
run;
Ask a Question
Discussion stats
  • 0 replies
  • 434 views
  • 0 likes
  • 1 in conversation