Hi:
I have a query on multi-level modelling for an outcome that is a proportion. Here are some details -
The outcome is a proportion (i.e. aggregated binary outcome) at country-level, for which I have a short time-series of data for a number of countries. I want to fit a (multi-level) longitudinal ‘growth curve’ model (i.e. principle predictor is year of observation), where level 1 is occasion (i.e. year) of observation and level 2 is country.
As a prelim, I’ve fitted the model assuming the outcome is continuous:
mixed x y || country:
where x is the outcome, y is year of measurement, and country is country id. (The model includes other predictors but I have left them out for simplicity).
But, it’s preferable to fit the model so the outcome is a proportion (using a binomial distribution) rather than as a continuous variable. However, I’ve been unable to find out what the correct Stata command is…
Apparently a single-level model where the outcome is a proportion would be of the form:
binreg x y, n(z)
where x is the outcome specified as a count (i.e. as the numerator of the proportion rather than a proportion), y is year, and z is the denominator of the proportion.
And, a multilevel model where the binary outcome is specified at the individual level would be of the form:
xtmelogit x y || country:
But I’m not sure what command I should use when the outcome is a proportion and I require a multilevel model. (I guess I could arbitrarily disaggregate the data to the individual level but this would be messy and I assume there’s an easier way).
If anyone is able to offer any advice I’d be grateful.
Thanks.
I have a query on multi-level modelling for an outcome that is a proportion. Here are some details -
The outcome is a proportion (i.e. aggregated binary outcome) at country-level, for which I have a short time-series of data for a number of countries. I want to fit a (multi-level) longitudinal ‘growth curve’ model (i.e. principle predictor is year of observation), where level 1 is occasion (i.e. year) of observation and level 2 is country.
As a prelim, I’ve fitted the model assuming the outcome is continuous:
mixed x y || country:
where x is the outcome, y is year of measurement, and country is country id. (The model includes other predictors but I have left them out for simplicity).
But, it’s preferable to fit the model so the outcome is a proportion (using a binomial distribution) rather than as a continuous variable. However, I’ve been unable to find out what the correct Stata command is…
Apparently a single-level model where the outcome is a proportion would be of the form:
binreg x y, n(z)
where x is the outcome specified as a count (i.e. as the numerator of the proportion rather than a proportion), y is year, and z is the denominator of the proportion.
And, a multilevel model where the binary outcome is specified at the individual level would be of the form:
xtmelogit x y || country:
But I’m not sure what command I should use when the outcome is a proportion and I require a multilevel model. (I guess I could arbitrarily disaggregate the data to the individual level but this would be messy and I assume there’s an easier way).
If anyone is able to offer any advice I’d be grateful.
Thanks.
Comment