I am hoping someone can help me.
I have a time variable coded as months from Jan 2016 to Feb 2020
I am hoping to fit some splines to my regression model to analyse trends over time
For this I need two variables, one is "before" and one is "after", which reflect time before and after the implementation of a policy
I need "before" to run as 0, 1, 2,3,4 etc upto March 2019, and "after" to run 0,1,2,3,4,5 from April 2019
Does anyone know some quick code which can help with this?
Thank you
Related Posts with Creating spine variables for regression
"Over", "subpop" and "if" options produce different means in svy: means, in the presence of post-stratification weightsHi All, Background: I am working with a client who phone-based information services and they would …
Issue concerning i.YearHello everyone, I am working on a panel data set whose time period goes from 2004 to 2016. I am expe…
Combinig two loops into oneDear All, I'm creating a dta file with names of files within a folder of my local disk. To do so, I…
Evaluating multivariable functions in StataI'm wondering if Stata can evaluate multivariable functions. Specifically, I have a function that ha…
Replace "Null"l by "" in a large datasetDear all, I have 1100 variables in my dataset. How can I replace "Null" by " " in the string variab…
Subscribe to:
Post Comments (Atom)
0 Response to Creating spine variables for regression
Post a Comment