Hello,
I am quite new to Stata and am trying to analyse some time series data but am having some issues with getting Stata to understand what i am asking
I have a variable - "Year" - which i generated from another variable - "Y" - using command: generate Year = date(Y, "Y"), after(Y)
This gave a list of days from Stata's base year as expected, but i could only format it into looking like's original form (which was a 4 digit year, e.x. 1988) by using command: format Year %tdcY,
which seemed odd but worked.
Now my problem is, when trying to list the observations if i use command: list Year if Year>2000 , it gives me all years from 1966 to 2015, so i guess Stata is still understanding 2000 as the days from January 1st 1960. Is there a way to change this so when i list observations from 2000 it will show them from the year 2000 not the days?
Any help would be much appreciated
Many thanks, Archie
Related Posts with Problem with specifying a range of year or listing years
Age in Months to the exact day?Hi everyone, I'm looking to find the exact age of survey participants in months. Right now I'm subt…
Changing the color of kdensity line on top of histogramI ran the following code to draw kdensity line on top of histogram. But it gives me a green color an…
Margins interaction variables Beta regressionDear Statalisters, I am running a regression with proportions as dependent variable. In the beta re…
Dummy based on other dummy variable (PANEL DATA)Hi, Stata. I want to create the wanted dummy to equal 1 if scaledummy is equal 1 in 3 continuous ye…
Problem with calculating the cumulated frequencyHi, Using the code below, I am trying to calculate the cumulated frequency at age x and above it. Ho…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with specifying a range of year or listing years
Post a Comment