Displaying 1 result from an estimated 1 matches for "yearofoccurevent1".
Did you mean:
yearofoccurevent2
2012 Jul 23
2
Creating panel data
...e 2nd quarter of 1968. If the event never occurred, 0 is recorded
for the Year Of Occurrence. Somewhat redundantly, I also have separate
dichotomous variables indicating whether the event ever occurred (0/1
format).
For example:
x <- data.frame( id = c(1,2), Event1Occur = c(1,0), YearOfOccurEvent1 =
c(68.25,0), Event2Occur = c(0,1), YearOfOccurEvent2 = c(0,68.5))
I need to transform that dataframe so that I have a separate row for each
time period (year/quarter) for each person, with variables for whether the
event had already occurred during that time period. If the event occurr...