[R-sig-ME] Large mixed & crossed-effect model looking at educational spending on crime rates with error messages
Ades, James
j@de@ @end|ng |rom uc@d@edu
Sun Sep 29 03:20:44 CEST 2019
Thanks, Ben and Philip!
So I think I was conflating having a continuous dependent variable, which could then be broken up into different categories with dummy variables (for instance, if I wanted to look at how wealth affects the distribution of race in an area, I could create a model like lmer(total people ~ race + per capita income + …) with creating something similar with a fixed factor (which I guess can’t be done).
I did try running the variables independently, which worked, I just thought there was a way to combine races, and then per that logic, thought that since race variables repeated within place (city/town), I could nest it within PLACE_ID. But realized that the percent race as a fixed effect (as an output) didn’t really make sense…hence my confusion. So I guess somewhere in there my logic was afoul.
Regarding Nelmed-Mead: that’s odd...I recall reading somewhere that it was actually quicker and more likely to converge. Good to know. I read through the lme4 package details here: https://cran.r-project.org/web/packages/lme4/lme4.pdf Would you recommend then optimx? Or Nloptr/bobyqa? (which I think is the default).
Regarding multicollinearity: is there an article you could send me on dealing with multicollinearity in mixed-effect models? I’ve perused the internet, but haven’t been able to find a great how to and dealing with it, such that you can better parse the effects of different variables (I know that one can use PCA, but that fundamentally alters the process, and isn’t there a way of averaging variables such that you minimize collinearity?).
One thing I’m currently dealing with in my model is that year as a fixed effect is correlated with a district’s spending, such that if I remove year, district spending has a negative effect on crime, but including year as a fixed effect alters the spending regression coefficient to be positive (just north of zero). Though here, specifically, I’m not sure if this is technically collinearity, or if time as a fixed factor is merely controlling, here, for crime change over time, where a model without year as a fixed factor would be looking at the effect of district spending on crime (similar to a model where years are averaged together). Does that make sense? Is that interpretation accurate?
Thanks much!
James
On Sep 28, 2019, at 8:09 AM, Phillip Alday <phillip.alday using mpi.nl<mailto:phillip.alday using mpi.nl>> wrote:
ink the answer to your proximal question about per_race is that
you would need five *different* numerical varia
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list