From: Steve Denham on
Lorraine,

Take a look at Example 20.1 Industrial Conference Board Data, in the online documentation for PROC PDLREG. I believe that they are treating "quarter" as a class variable here. The trick is to code it with dummy variables. What I don't see is how to get a joint significant test for all quarters, but you would at least have the test of differences of quarters 1, 2 and 3 vs. quarter 4 in the output. By analogy, you could get tests of differences of sites 1 thru n-1 vs site n.

To get an overall test, it looks like you will have to employ the RESTRICT statement. This looks like the RESTRICT statement in PROC REG, with which I am not familiar. I would fit the model with and without the restriction (of all sites being equal to zero, with the intercept suppressed), and see what happens.

Good luck.
Steve Denham
Associate Director, Biostatistics
MPI Research, Inc.



----- Original Message ----
From: Lorraine Wilson <lorraine_mb(a)HOTMAIL.COM>
To: SAS-L(a)LISTSERV.UGA.EDU
Sent: Tue, November 3, 2009 9:06:07 AM
Subject: Proc pdlreg & class effects

Hello all,

I am trying to analyse a timeseries dataset in PROC PDLREG, but would like
to include a class effect in the model, which this proc doesnt allow. Is
there another procedure which would allow this?

The dependent data are discharge rates from a stream, recorded at 15minute
intervals over 2 years. The effects in the model are: rainfall at 15 min
intervals, datetime or monthyear, and proportion of the stream catchment
that has undergone habitat restoration. I have also included an
autoregression effect. Thus my code at present is:

Proc pdlreg data = trafag;
by site;
model streamflow = monthyear(12,2) rainfall(12,4) proportion / nlag=4;
run;

At present, as the code shows, I am analysing data from several different
streams separately. However, it would be neater & more robust to analyse
all the streams together with 'site' as a class effect (and potentially
site(proportion)). Is this approach valid as it stands, and is there a way
to analyse all streams together?

Many thanks
Lorraine