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.
How to shuffle or randomly assign the values within each group?Hi everyone! This is my first time to post a question here. I am working on a historical population…
just-identified IV with ivlasso and multiple endogenous variablesDear Statalist I would like to estimate an IV regression with a high-dimensional set of controls us…
Formula to standardize a variable without "gen" and "egen"Hello, I am a French student who is starting to work with Stata 16, and I need to find a formulatio…
How to move an active STATA15 licence from one device to anotherDear all, I need to move my STATA 15 licence from my current laptop to a new one. How do I need to p…
Writing likelihood function for interval based dataHi Statalist I am studying the determinants of unemployment spell, which is, in my study, explained …
Subscribe to:
Post Comments (Atom)
0 Response to Setting up data for xtstreg/mestreg (and using it) correctly.
Post a Comment