[R-sig-ME] lme4: plotting profile density (not Zeta) manually not by lattice

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Mon Oct 26 14:19:01 CET 2020


    Can you clarify a bit what you want to plot?
   as.data.frame(p) is a good way to retrieve a simple data frame from 
profile objects that you can then transform/use to plot as you see fit.

   Ben Bolker

On 10/25/20 8:54 PM, Simon Harmel wrote:
> Dear All,
> 
> I'm trying to plot the sampling distributions of my model parameters using `
> densityplot()` from the `lattice` package but lattice often throws an error
> even if one of the estimate's density distribution is highly skewed or
> funny-looking.
> 
> Is there a better package or a better way (even manually) to plot the
> densities (not Zeta) from a `profile()` call?
> 
> library(lattice)
> library(lme4)
> 
> hsb <- read.csv('
> https://raw.githubusercontent.com/rnorouzian/e/master/hsb.csv')
> m31 <- lmer(math ~ ses*meanses + (ses | sch.id), data = hsb)
> 
> p <-  profile(m31)
> densityplot(p)
> Error in UseMethod("predict") :
>    no applicable method for 'predict' applied to an object of class "NULL"
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models using 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