Programming the statistical procedures from SAS

Splines

Reply
Occasional Contributor
Posts: 9

Splines

Apologies for cross-posting

Hi,

I'm an amateur at SAS programming and I'm new to the topic of spline functions, and hope that someone might be able to help.

Let's say I have an unbalanced panel dataset. My dependent variable is Y, and I want to determine whether the linear and squared terms of performance below a certain reference point (x1, x1^2) and the linear and squared terms of performance above the reference point (x2, x2^2) affect Y. I understand that spline functions permit continuous relationships to join and change slopes at reference points called ‘knots’ (Greene, 2002). In my study, the knot is theoretically determined to be the status quo (i.e., zero). I would like to use fixed effects panel spline regression in my study.


Here are my questions:-


(1) I understand there are many spline procedures out there such as PROC NLIN, PROC TRANSREG, PROC LOESS, PROC TPSPLINE, AND PROC GAM. Which spline procedure is appropriate for my study?


(2) Does anyone know the SAS codes to get at the research question above? How do I incorporate the fixed effects component into spline functions?


Thanks in advance for your help.


Best,

Elizabeth

Respected Advisor
Posts: 2,655

Re: Splines

Hi Elizabeth,

Ordinarily when I think of panel data, I think of multiple dependent variables (Y variables).  Could you be more specific in your definition of "panel', as if you are dealing with multiple Y variables, I don't think any of the procs you listed will be adequate.

Given all that, if it is a single dependent variable, I would start with GAM and TPSPLINE.

Another way of looking at this would be through the use of the EFFECT statement.  There are several procs which accommodate spline effects through the EFFECT statement.

But if this is truly panel data (time series and cross-sectional data), I am at a loss.  You could try posting in the Forecasting and Econometrics forum, as the folks there know a LOT more about panel data than I do.

Steve Denham

Occasional Contributor
Posts: 9

Re: Splines

Hi Steve,

Thanks for taking the time to answer my questions!

I'm using one dependent variable (Y) and the data structure is time-sries and cross-sectional data. I'm curious to know why you think GAM and TPSPLINE are more suitable for single dependent variable. Would NLIN or TRANSREG work as well for single Y?

I know you mentioned that you're not familiar with panel data, but if this was just a regular data set with a single Y that works with GAM and TPSPLINE, do you have any idea how I might be able to incorporate fixed effects into GAM or TPSPLINE (or NLIN / TRANSREG for that matter)?

Thanks for your insights!

Best,

Elizabeth

Respected Advisor
Posts: 2,655

Re: Splines

TRANSREG would be OK too.  In any case, when you say fixed effects, are you referring to classification type variables (say SEX= male or female)?  In any case, all of these procs model independent variables as fixed effects (as opposed to random effects).  I might be misunderstanding what you mean by fixed effect, though.

Steve Denham

Ask a Question
Discussion stats
  • 3 replies
  • 215 views
  • 0 likes
  • 2 in conversation