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.
Adjusting variables with Nelson-Aalen cumulative hazard functionDear all! I am struggling with the survivor function of the Nelson-Aalen cumulative hazard function…
How to use percentile data and raw data?Hi everyone I have a question for you? The model I use has both percentage variables and raw data. A…
how to get foreach of varlist v1-v10 take every second variable from the specified set (v1 v3 v5...)?Hi dear Statalisters, I was wondering if there is any way to get Stata to pick every second variable…
Inconsistent Behavior Between Mata Functions and Identical Class Methods Toward Object TypesThis is occasioned by a thread begun by Alfonso Sánchez-Peñalver here. It’s been a while since I’ve…
Questions about the spmap commandHello Stata Community, I am currently using STATA/SE 14 to analyze social expenditure at the region…
Subscribe to:
Post Comments (Atom)
0 Response to Setting up data for xtstreg/mestreg (and using it) correctly.
Post a Comment