We illustrate how to fit multilevel models in the MLwiN package seamlessly from within Stata using the Stata program runmlwin. We argue that using MLwiN and Stata in combination allows researchers to capitalize on the best features of both packages. We provide examples of how to use runmlwin to fit continuous, binary, ordinal, nominal and mixed response multilevel models by both maximum likelihood and Markov chain Monte Carlo estimation.
We develop and apply a multilevel modeling approach that is simultaneously capable of assessing multigroup and multiscale segregation in the presence of substantial stochastic variation that accompanies ethnicity rates based on small absolute counts. Bayesian MCMC estimation of a log-normal Poisson model allows the calculation of the variance estimates of the degree of segregation in a single overall model, and credible intervals are obtained to provide a measure of uncertainty around those estimates. The procedure partitions the variance at different levels and implicitly models the dependency (or autocorrelation) at each spatial scale below the topmost one. Substantively, we apply the model to 2011 census data for London, one of the world’s most ethnically diverse cities. We find that the degree of segregation depends both on scale and group.
His research interests are in the use of statistical modeling techniques, in particular MCMC methods, for analyzing complex datasets in many fields including veterinary epidemiology, ecology and education.
R2MLwiN is a new package designed to run the multilevel modeling software program MLwiN from within the R environment. It allows for a large range of models to be specified which take account of a multilevel structure, including continuous, binary, proportion, count, ordinal and nominal responses for data structures which are nested, cross-classified and/or exhibit multiple membership. Estimation is available via iterative generalized least squares (IGLS), which yields maximum likelihood estimates, and also via Markov chain Monte Carlo (MCMC) estimation for Bayesian inference. As well as employing MLwiN's own MCMC engine, users can request that MLwiN write BUGS model, data and initial values statements for use with WinBUGS or OpenBUGS (which R2MLwiN automatically calls via rbugs), employing IGLS starting values from MLwiN. Users can also take advantage of MLwiN's graphical user interface: for example to specify models and inspect plots via its interactive equations and graphics windows. R2MLwiN is supported by a large number of examples, reproducing all the analyses conducted in MLwiN's IGLS and MCMC manuals.
BackgroundThis study aimed to estimate the cost-effectiveness of a universal strategy to promote physical activity in primary care.MethodsData were analysed for a cohort of participants from the general practice research database. Empirical estimates informed a Markov model that included five long-term conditions (diabetes, coronary heart disease, stroke, colorectal cancer and depression). Simulations compared an intervention promoting physical activity in healthy adults with standard care. The intervention effect on physical activity was from a meta-analysis of randomised trials. The annual cost of intervention, in the base case, was one family practice consultation per participant year. The primary outcome was net health benefit in quality adjusted life years (QALYs).ResultsA cohort of 262,704 healthy participants entered the model. Intervention was associated with an increase in life years lived free from physical disease. With 5 years intervention the increase was 52 (95 % interval −11 to 115) per 1,000 participants entering the model (probability increased 91.9 %); with 10 years intervention the increase was 102 (42–164) per 1,000 (probability 99.7 %). Net health benefits at a threshold of £30,000 per QALY were 3.2 (−11.1 to 16.9) QALYs per 1,000 participants with 5 years intervention (probability cost-effective 64.7 %) and 5.0 (−9.5 to 19.3) with 10 years intervention (probability cost-effective 72.4 %).ConclusionsA universal strategy to promote physical activity in primary care has the potential to increase life years lived free from physical disease. There is only weak evidence that a universal intervention strategy might prove cost-effective.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.