Hi Statalisters
I have a data set with monthly sex-specific suicide and suicide attempts within all regions in a country over several years. (Male are odd-numbered and females are even-numbered on id-variable.)
The data set has observations for each id for every time-period and should to the best of my knowledge be "strongly balanced". However, when I use set the data as panel data with:
I get the following feedback:
Here is an extract of the data:
"alive_without_physical_harm", "alive_w_phys_harm" and "dead" is suicide (attempts) variables, while "eventdate" is the applied time variable (formatted as month, year). I would use dataex, but I'm currently on a work computer with download restrictions (however, I can upload later if required).
Hopefully some of you have an answer to this.
Best
Tarjei
I have a data set with monthly sex-specific suicide and suicide attempts within all regions in a country over several years. (Male are odd-numbered and females are even-numbered on id-variable.)
The data set has observations for each id for every time-period and should to the best of my knowledge be "strongly balanced". However, when I use set the data as panel data with:
Code:
xtset id eventdate, monthly
Code:
xtset id eventdate, monthly panel variable: id (weakly balanced) time variable: eventdate, January2012 to December2017 delta: 1 month
Code:
alive_wo_physical_harm alive_w_phys_harm dead month year eventdate regionnum datasrc id regionnumeric sexnumeric 10 0 3 1 2012 January2012 1 0 1 North central region male 20 0 0 1 2012 January2012 1 1 2 North central region female 8 0 9 2 2012 February2012 1 0 3 North central region male 11 0 0 2 2012 February2012 1 1 4 North central region female 7 1 9 3 2012 March2012 1 0 5 North central region male 16 0 6 3 2012 March2012 1 1 6 North central region female 5 0 3 4 2012 April2012 1 0 7 North central region male 17 0 7 4 2012 April2012 1 1 8 North central region female 7 0 7 5 2012 May2012 1 0 9 North central region male 12 0 5 5 2012 May2012 1 1 10 North central region female
Hopefully some of you have an answer to this.
Best
Tarjei
Comment