# [R-sig-ME] request

anvarsour anvarsour at ut.ac.ir
Tue Nov 8 19:24:00 CET 2016

```I'm sorry, I would be grateful to help me, if is possible for you for
solving this problem.

I used mixed effect model (with fixed and random factor) for analysis
relationships between species richness and biomass. as following:

mod.s05x05 <- fm1_logB2 <- glmer (S ~ disturbance*log(sumBiomass) +
disturbance*I(log(sumBiomass)^2) + (1|site), data= abbb, family=
poisson, nAGQ=0)

in above model disturbance* log(sumBiomass and
disturbance*I(log(sumBiomass)^2) are fixed factors and (1|site) is
random factor

disturbance level has five levels.

but I had problem when I want to run plotting prediction for that.

as you see our model is log-quadratic.

coefs05 <- fixef(mod.s05x05) # Extract fixed-effects estimates

coefs05
(Intercept) disturbance
-3.83519985 -0.26622660
log(sumBiomass) I(log(sumBiomass)^2)
3.04840462 -0.37551457
disturbance:log(sumBiomass) disturbance:I(log(sumBiomass)^2)
-0.01181700 0.01711205

as you see in "coefs05" this model has many estimated coefficients, such
as: disturbance, log(sumBiomass), I(log(sumBiomass)^2),
disturbance:log(sumBiomass)  and disturbance:I(log(sumBiomass)^2)

how can I write above estimated coefficients for newdat and mm and
newdat\$y as you see in the following?

I faced with error when I want to run following functions. because
following functions not conformable arguments.

newdat<-data.frame(x=log(5:300), x2=log(5:300)^2)

mm <- model.matrix(~x+x2)

newdat\$y<-mm%*%fixef(mod.s05x05)

Best Regards,

Anvar,

-- -- --
Anvar Sanaei

Ph.D. Student in Range Management, Department of Reclamation of Arid and
Mountainous Regions, Natural Resources Faculty, The University of
Tehran, Karaj, Iran.
[[alternative HTML version deleted]]

```