Hi, all.
I imported a dataset from excel to stata with data from seven years. I am trying to create a variable called wet season by year but I'm not having any luck. I am using the following command
gen wet-season-2002 = if Date >= mdy(7,31,year(2002)) | date < mdy(10,31,year(2002)) Attached is the excel file I am trying to run on stata.
Thanks in advance.
Related Posts with Creating seasons of the year by using gen command
Looping through two different sets of valuesI have data from several years. Each is stored in a file entitled "year 1" "year 2" .... "year 8". T…
nwcommands "invalid" errorHello, I just discovered the nwcommands in stata for network analysis. This will make life so much e…
How to make a loop continue working if a variable it is not found?Hello. I am trying to generate graphs from some variables. I do not have all possible combinations …
Filling in Missing YearsHi Statalist, I'm trying to fill in missing years for my dataset, but something is off. The origina…
real salary matrix calculationHi all, I would like to generate a matrix that contains in the first column the average of a variab…
Subscribe to:
Post Comments (Atom)
0 Response to Creating seasons of the year by using gen command
Post a Comment