BookmarkSubscribeRSS Feed
sasuser2011
Calcite | Level 5

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

3 REPLIES 3
SteveDenham
Jade | Level 19

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

sasuser2011
Calcite | Level 5

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

SteveDenham
Jade | Level 19

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 1487 views
  • 0 likes
  • 2 in conversation