Hi all,
I have an (independent) variable 'yearquarter' in my data that looks like "2001q3" and so on.
After performing regression, I have to generate a graph with the Price as dependent variable on the Y-axis and Yearquarter on the X-axis using "margin and marginsplot".
But in order to do so, I want to only keep the last digit of the variable yearquarter, so in this case the "3" of 2001q3.
How can I only keep this last digit?
Thanks!!
Related Posts with Keep last digit of a variable
ppmlhdfe standard errors Newey westHello Statalist users, I have a question regarding the ppmlhdfe command. More precisely, I have a (…
Set a number of variables equal to 0 if a condition is verifiedHi I have a dataset with 48,000 observations (individuals) and about 150 variables. I know the age …
Meta-analysis subgroup difference testingHi, I need some advice please. I am conducting a meta-analysis. I have subgroups (male/female, whit…
new variable from mi imputeDear all, I'm struggling to generate a new variable after a Multiple Imputation. I'm new in MI, but…
IV Regression With Interaction Terms and 2+ InstrumentsDear all, Greetings to all contributors from someone new to the forum and a user of Stata 15.1/SE. …
Subscribe to:
Post Comments (Atom)
0 Response to Keep last digit of a variable
Post a Comment