Hi all,
I am having a matched pair dataset with seropositive as cases and seronegative as controls. Matching of cases and controls were done on village, farm, species, breed and age within 2 years (either direction i.e. older or younger). The pairs are given a number by groupid. we have another variables like milk production (kg), parity (number of times an animal have calved), time since last calving (months) and test status (pos or neg). I want to know the effect of parity, test status and time since last calving on milk production and effect has to take the matched pairs into consideration.
Mr Phil advised the following command:
'' xtset pair
xtreg b_milk_kg i.elisa c_last_calve_months e_parity ,fe
If you're pairing at the village, farm and species level (i.e., the identified pairs are within the same village, farm and species), then fixed effects for pair will control for such things. This can also be done with areg and mixed (previously xtmixed but just mixed in newer versions of Stata) but I'm more comfortable with xtreg.''''
Just wanted to know in place of pair in xtset command, should I write groupid (as matched pairs are identified by groupid) and then the second command:
xtreg b_milk_kg i.elisa c_last_calve_months e_parity ,fe
Thanks
Related Posts with regression on continuous outcome variable paired match case control study
stata command for upper tail confidence intervalConstruct an upper 95% confidence interval for the mean of full score IQ for lead exposure group 1, …
Assigning different time values to the same dependent and control variableDear, I am trying to estimate how well the U.S. yield spread predicts future inflation. The regres…
Calculate the standard deviation of the firm's daily stock return over the past three monthsHello everyone, I have daily panel data and I want to calculate the standard deviation of the firm'…
Claculate standard diviation of firm's daily stock return over the past three monthsHello everyone, I have daily panel data and I want to calculate the standard deviation of the firm'…
metatrim on MDHello, I am having some issues with metatrim. I checked previous posts and I am having the same pro…
Subscribe to:
Post Comments (Atom)
0 Response to regression on continuous outcome variable paired match case control study
Post a Comment