user7592911
user7592911

Reputation:

How to calculate p-values for GLMM fitme()-Model spaMM-Package?

I used a GLMM with the the fitme()-function of the spaMM-package. The model runs fine, however no p-values are emitted (see below):

Model1<-fitme(arten~ SGroesse*KF*DeckKF +(1|Hof) + Matern(1|Koordinaten_1 + Koordinaten_11),
       data=kopfschlag1,family=negbin(),HLmethod="ML")

summary(Model1)
formula: arten ~ SGroesse * KF * DeckKF + (1 | Hof) + Matern(1 | Koordinaten_1 + 
    Koordinaten_11)
Estimation of lambda, NB_shape, nu and rho by ML approximation (p_v).
Estimation of fixed effects by ML approximation (p_v).
Estimation of lambda, NB_shape, nu and rho by 'outer' ML, maximizing p_v.
Family: Neg.binomial(shape=442.5) ( link = log )
 ------------ Fixed effects (beta) ------------
                              Estimate Cond. SE  t-value
(Intercept)                   1.219337 1.479982  0.82389
SGroesse                      0.680895 0.353169  1.92796
KFMais                        2.792657 2.509501  1.11283
[the list goes on...]           ...
 --------------- Random effects ---------------
Family: gaussian ( link = identity )
Correlation parameters:
        nu        rho 
  16.66667 3494.08409 
Outer estimate of lambda ( Hof ):  1e-06
Outer estimate of lambda ( Koordinat. ):  0.04556 
# of obs: 200; # of groups: Hof, 15; Koordinat., 200 
 ------------- Likelihood values  -------------
                        logLik
p_v(h) (marginal L): -577.0237
  p_beta,v(h) (ReL): -577.0237

Can anybody help me, how to get p-values for this model (lmerTest did not work add p-values, seems not run with the spaMM package)?

In addition, do you have an idea, how to calculate post-hoc tests (e.g. tukey-test) for the the fitme()-model?

Greetings, A.

Upvotes: 2

Views: 908

Answers (2)

Sihao
Sihao

Reputation: 1

Maybe too late for this post.. I have got this issue as well. I find now how to deal with it after some time of research.

so first use as.data.frame(summary(model1)$beta_table) to get t-values and then p.value = 2*pt(-abs(t.value), df=length(data)-1) (refer https://stats.stackexchange.com/questions/45153/manually-calculating-p-value-from-t-value-in-t-test)

you may need to use df.residual(model1) to get df

Upvotes: 0

russellpierce
russellpierce

Reputation: 4711

p-values for mixed effects models are often a subject of great debate/problematic. If you must have a p-value, you have an estimate, you have a standard error, you have a t-value... pick a df you can sell and calculate your p-value... https://stats.stackexchange.com/questions/45153/manually-calculating-p-value-from-t-value-in-t-test

Upvotes: 2

Related Questions