Hi everyone,
I'd been trying to run a panel data on expt participation using xtstreg and/or mestreg (Stata 15) and I keep getting nagging suspicion that I haven't set up the data correctly. The problem that I'm trying to deal with is as follows:
1. Expt subjects participate in a multiround game with two different starting conditions from which they may quit after n round. Quitting is the event of interest.
2. After X rounds, there's an intervention common across both conditions. We want to know if the effect of this intervention on hazard rate is different across the starting conditions among the survivors.
I've set up the data so that each participant-round is its own observation, i.e. for every participant, we have T observations, where T is the total number of rounds. The failure event is coded so that if a participant quit after round n, the event variable is coded 1 for every round from n+1 through T (and every round from 1 through n is coded 0). "rounds" is the time variable and the particpant id is the panel variable. I've been running variations of the following model:
xtstreg condition##intervention
where intervention is a dummy variable for all rounds after X. with xtset (participant id) and stset round, failure(quit)
Predicted values from the resulting output seem a bit peculiar: if I use predict, mean command to calculate the marginal mean survival time, for example, the values are obviously too big, for example. I'm not too sure about the moving parts of this model and something tells me that I have not set up the data correctly and/or doing something otherwise wrong, but I can't seem to figure out what might be going on from the manual alone. Can you offer some advice?
Thank you!
Related Posts with Setting up data for xtstreg/mestreg (and using it) correctly.
Should I use "c." or "i." prefix or something else?Dear all, I have a panel dataset of rated firms and want to study the effect of busyness cycles on …
Main effect changes signStep-1 I run a regression with one independent variable (that is of primary interest to my research)…
Difference-in-DifferenceGood morning, Kindly I am new in this command. What does it mean that I don't have significance in …
How 'mixed' Command Identifies Level-1 and Level-2 Variables?My confusion is depicted in the picture below: Array …
floatplot updated on SSCThanks as always to Kit Baum, the files for floatplot on SSC have been updated. Somehow or other th…
Subscribe to:
Post Comments (Atom)
0 Response to Setting up data for xtstreg/mestreg (and using it) correctly.
Post a Comment