Hello Statalist--
I have an appended dataset that has a variable named 'filename' which tracks the original file name for each observation.
The filenames are structured in the following manner: 'medicaid_co_0219.csv', where the first two digits of '0219' (i.e. 02) is the month and the final two digits (i.e. 19) is the corresponding year.
I would like to create two variables: one for month and one for year but have no idea how to go about it. Ideally the year should be reflected in four digits (so instead of showing up as 19, it would show up as 2019), but if this is not possible no worries because that is an easy fix. My priority is creating those two new variables.
Any help is greatly appreciated.
Related Posts with [HELP] Creating new variables by splitting another variable
How to create a variable that has 10 runs of 1 and -1Hello everyone I am facing a problem in creating a variable, called indicator, that will have a valu…
stata mlogit IIA under Hausman and Small-Hsiao testsDear Statalists, I am currently using a multinomial logit model, where the dependent variable has f…
quaids eta useHi, I am using the quaids command to estimate an AIDS for different meats. I am interested in how co…
Goodness of fit after gesm (model contains ordinal and binary items)Hello, I fitted a confirmatory factor analysis model that contains both ordinal and binary items, us…
Transform daily standard deviation of residuals to monthly standard deviation of residualsHello, I´m trying to obtain monthly standard deviation of residuals as a proxy for monthly idiosyncr…
Subscribe to:
Post Comments (Atom)
0 Response to [HELP] Creating new variables by splitting another variable
Post a Comment