[R-sig-ME] question about random coefficients model (RCM)

JOSE A ALEMAN aleman at fordham.edu
Fri Jul 30 22:48:33 CEST 2010


Hi Andy,

You're right, ranef() does actually work. Actually, data.neocorporatism is
pretty much a time-invariant institutional variable. What I want is to
estimate a random intercepts random slopes model where the effects of other
time varying variables enter the model through the institutional variable
"data.neocorporatism". The effects for neocorporatism, in other words,
should be different depending on the country, that is, there shouldn't be a
single coefficient for this variable but 18 different coefficients for the
18 different countries. If that's the case, then "data.neocorporatism"
should not be in the fixed effects equation.

I indeed tried the model having removed this variable, but the result after
typing coef() was the same. Actually, ranef() gave me what I believe are
the random intercepts for each country, but I still need to figure out a
way to get the coefficients.

I'm probably doing something wrong, but I am basically trying to fit a
model similar to Western's (1998) described in my original message below.

Thank you,

Jose


                                                                           
             Andrew Dolman                                                 
             <andydolman at gmail                                             
             .com>                                                      To 
                                       JOSE A ALEMAN <aleman at fordham.edu>  
             07/30/2010 03:45                                           cc 
             PM                        Douglas Bates                       
                                       <bates at stat.wisc.edu>,              
                                       dmbates at gmail.com,                  
                                       r-sig-mixed-models at r-project.org    
                                                                   Subject 
                                       Re: [R-sig-ME] question about       
                                       random coefficients model (RCM)     
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi Jose

data.nation is not present in the the fixed effects specification of
your model, so coef() won't work, but ranef() should. Your model
assumes that there is no overall relationship between data.gini_net
and data.nation and yet allows for a relationship within the
sub-groups defined by data.neocorporatism_std, with a slope that
varies randomly between groups but is zero overall. That's probably
not what you want.

I also notice that data.neocorporatism seems to have been standardised
somehow, which would be odd for a categorical variable used to group
things.



andydolman at gmail.com



On 30 July 2010 18:52, JOSE A ALEMAN <aleman at fordham.edu> wrote:
> The model I'm using is of the form:
>
> RCM <- lmer (data.gini_net ~ data.neocorporatism_std +
> data.firm_level_coop_std + data.cog + data.gov_employ_std +
>      data.netden_std + data.trade_openness_std +
> data.capital_liberalization_std + data.lagged_unemploy_std +
>      data.deindustrialization_std + data.pop_over_65_percent_std +
> (data.nation|data.neocorporatism_std), data=new.data)
>
> but when I try to use the extractor coef(), I get the following error
> message:
>
>> coef(RCM)
> Error in coef(RCM) : unable to align random and fixed effects
>
>
>
>
>             Douglas Bates
>             <bates at stat.wisc.
>             edu>                                                       To
>             Sent by:                  JOSE A ALEMAN <aleman at fordham.edu>
>             dmbates at gmail.com                                          cc
>                                       r-sig-mixed-models at r-project.org
>                                                                   Subject
>             07/17/2010 11:30          Re: [R-sig-ME] question about
>             AM                        random coefficients model (RCM)
>
>
>
>
>
>
>
>
>
>
> On Sat, Jul 17, 2010 at 9:52 AM, JOSE A ALEMAN <aleman at fordham.edu>
wrote:
>>
>> Dear list users,
>>
>> I have a question about how to estimate the RCM described by Western
> (1998)
>> in his article "Causal Heterogeneity in Comparative Research: A Bayesian
>> Hierarchical Modeling Approach". While I know how to estimate this model
> in
>> R via restricted maximum likelihood, I am at a loss as to how to
> interpret
>> the results. The random coefficients are supposed to be different for
> each
>> country, yet R provides  a standard regression-like output with a single
>> coefficient for the variable with the random slope. How would I go about
>> extracting the country specific information?
>
> Can you be more specific about how you fit the model?  Just saying "in
> R" is too general.
>
> If you fit the model with lmer from the lme4 package then you may want
> to look at the output from the ranef() and coef() extractors.
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>




More information about the R-sig-mixed-models mailing list