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
Returning the name of a variable that takes on the maximum value within a set of other variables?Hey folks. I have a dataset with respondents reporting how many visits they took to certain recreati…
using tabout to produce multi-page latex tablesI want to produce a frequency table with many variables. Because there are so many variables, the ta…
Taking a midpoint of quarterI have two numeric variables labeled quarter (1,2,3,4) and year. I want to generate a new variable t…
Interpreting a fixed effects regression whether the treatment variable is binaryHello all, There have been similar posts about this interpretation but I can't find any with the sa…
multinomial logit questionI am trying to run a multinomial logit as y being the number of credit cards an individual has. I re…
Subscribe to:
Post Comments (Atom)
0 Response to regression on continuous outcome variable paired match case control study
Post a Comment