Hi all
I am comparing proportion of people who attend a clinic between two different time periods.
the two time periods are different in length – one is 3-months; the other is 9 months.
I would like to ask how do I tell SAS the time (or how does SAS understand what my time is) - in my code I have entered 3 for 3 months and 9 for 9 months - is this correct - would appreciate any advice
thanks
data Non_urg(keep=time case log_t);
infile datalines;
input time case pop;
log_t=log(time);
output Non_urg;
datalines;
9 144 1574
3 76 916
;
proc genmod data=Non_urg;
model case=time/ dist=poisson link=log offset=log_t;
run;
SAS understands that 3 is different than 9, and that 9 is six greater than 3, and so on.
Nothing you have done here indicates to SAS that these are time intervals or times, nor is that necessary to use PROC GENMOD properly.
thanks for replying to my message
my understanding is that I don't need the offset if the two time periods were the same length; but I need to use it when time periods are different lengths.
so how do I indicate to SAS that they are time periods if my code is not correct. can you explain more how I use the proc genmod properly
appreciate your time - its been a while since I've used SAS
thanks
As far as I can see, your code is correct.
@Lorraine22 wrote:
can you explain your reply from earlier "Nothing you have done here indicates to SAS that these are time intervals or times".
I'm trying to understand how to indicate to SAS that they are time intervals.
is it by the inclusion or exclusion of the offset?
Here is an example of Poisson regression in SAS: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_genmod_gettingstarted01.htm
It seems to me your code is correct, and that you don't have to do anything else. There is no such thing as an "interval" in SAS, you don't have to specify that something is an "interval" (and in fact, you can't indicate that anyway).
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.