BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
PamG
Quartz | Level 8

I need to use distributed lag model (DLM) on a binary outcome.  There is PDLREG but it can be applied to continuous outcomes. So it seems like the only way I can do this is using PROC MODEL and use %pdl macro.  However I am using a 1:5 matched data and need to use conditional logit.  How does one implement a conditional logit model in PROC MODEL?  I am aware that conditional logit model can be implemented in PROC PHREG or PROC LOGISTIC.  My need to use PROC MODEL is that I can use the pdl macro.

 

A sample code is given below for a continuous dependent variable.  I would like a similar code for conditional logit that would take into account the matched sets.  

proc model data=pdl;
   parms int;                  /* declare the intercept parameter */
   %pdl( xpdl, 6, 4 )          /* declare the lag distribution */
   y = int + %pdl( xpdl, x );  /* define the model equation */
   fit y / list;               /* estimate the parameters */
run;

 

Ideally I need to use DLNM model but unfortuantely SAS does not have a procedure in place for this .  Now I need to use DLM but seems like I have hit a roadblock with that too.  

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PamG
Quartz | Level 8

An update, Almon lags can easily be created in data step. I will be using these derived variables in conditional logit using PROC LOGISTISTIC and then back-tranform the effects to the original lagged variables.   I wish there was an easier way to do it.

View solution in original post

4 REPLIES 4
sbxkoenk
SAS Super FREQ

Hello,

 

Cannot answer your question, but moving it to more appropriate board ("Forecasting and Econometrics" - board).

 

SAS/ETS User's Guide
The MODEL Procedure
Distributed Lag Models and the %PDL Macro
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/etsug/etsug_model_sect170.htm

 

Koen

PamG
Quartz | Level 8

Thanks.  But it seems to me that this is also a SAS programming question of how to use PROC MODEL to implement a conditional logit model.

sbxkoenk
SAS Super FREQ

While most (the big majority) of the procedures are "pre-written" programs that are built in, some procedures do indeed allow for additional programming within the boundaries of the initial "PROC" and the ending "run;" or "run; quit;" keywords.

 

Think about PROC NLMIXED, PROC MCMC, PROC MODEL, ...

 

This is indeed programming, but it still requires a lot of statistical / econometrical knowledge.

 

The programming board is about data management, data step programming, SQL, macro language, global statements and so on ...

 

Br, Koen

PamG
Quartz | Level 8

An update, Almon lags can easily be created in data step. I will be using these derived variables in conditional logit using PROC LOGISTISTIC and then back-tranform the effects to the original lagged variables.   I wish there was an easier way to do it.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 733 views
  • 1 like
  • 2 in conversation