Dear Statalists,
I have an excel file with dates like 29.02.1980, 30.03.1980 and etc... I have appended Y in front of every date in the excel file and then imported it to the STATA. I had to appended Y in front of dates since i have to reshape the data (from wide to long) in the STATA.
I have used codes like: gen year = year(date) - 60 // Getting YEAR from the date
gen month = month(date) // Getting MONTH from the date
With year everything worked fine but with month i am getting wrong values, what can be possible reason for that and how can i fix it?
Related Posts with extracting data from numbers
When choosing between random and fixed effects models for logistic regressionI understand the assumption for using a random effects model is that the unobserved group-level effe…
Compute the solution to the dual problem using LinearProgram() classHi! First of all, happy new year to everyone reading this post! I am fairly new to Mata and am usi…
Dealing with log-binomial convergence problemHi everyone I am looking for a way to change the "weight function of pi" [1/(1-Pi)] in the GLM mode…
Testing difference between variances of two variables from the same populationGreetings, For a methodological framework I am developing, I need to test the difference between var…
Esttab formatting to numbers in excel fileHi Statalist, I am using esttab from SSC in Stata 16.1 to make summary tables of tab (percents) in …
Subscribe to:
Post Comments (Atom)
0 Response to extracting data from numbers
Post a Comment