# Why these three models suggest such a great difference on the significance

Does someone could tell me why these three models suggest such a great difference on the significance of factors? And which one is much reasonable?

M1<-glmer(BL~Gender+cYear+TR+T4+R5+Sun+(1|Group), weights = n, family = Gamma(link="log"),data=Aan_St
M3<-gam(BL~Gender+TR+T4+R5+Sun+s(Group,bs="re",k=6)+s(Year,bs="tp",k=20)+ s(fYear,bs="re"), method="REML", family = Gamma(link="log"),data=AT_St)


My data has multiple observations per group in each year. Here for M1, I used aggregate data and weights=n to account for the different amount of sampling. M2 and M3 are using raw data and Year as random effect. The results suggest factors are great significant in M1 but in M2 and M3 are not. The summaries are below:

M1:

Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
Family: Gamma  ( log )
Formula: BL ~ Gender + cYear + TR + T4 + R5 + Sun + (1 | Group)
Data: Aan_St
Weights: n
Control: glmerControl(check.conv.singular = .makeCC(action = "ignore",
tol = 1e-04), optimizer = "bobyqa", optCtrl = list(maxfun = 2e+05))

AIC      BIC   logLik deviance df.resid
12939.8  12964.9  -6460.9  12921.8      111

Scaled residuals:
Min       1Q   Median       3Q      Max
-2.70196 -0.70689  0.05356  0.59470  2.16005

Random effects:
Groups   Name        Variance Std.Dev.
Group    (Intercept) 0.002477 0.04977
Residual             0.012303 0.11092
Number of obs: 120, groups:  Group, 6

Fixed effects:
Estimate Std. Error t value Pr(>|z|)
(Intercept)  4.524e+00  5.137e-02  88.078  < 2e-16 ***
GenderMale   2.180e-02  7.681e-02   0.284    0.777
cYear        2.227e-03  9.154e-05  24.330  < 2e-16 ***
TR           5.337e-03  5.149e-04  10.367  < 2e-16 ***
T4           1.249e-02  5.443e-04  22.947  < 2e-16 ***
R5          -2.269e-03  4.227e-04  -5.368 7.96e-08 ***
Sun         -4.089e-03  5.267e-04  -7.763 8.29e-15 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
(Intr) GndrMl cYear  TR     T4     R5
GenderMale -0.670
cYear       0.003  0.000
TR         -0.003  0.000 -0.226
T4         -0.001  0.001 -0.570 -0.327
R5          0.000  0.000  0.131 -0.144 -0.168
Sun         0.000  0.000  0.247  0.290 -0.464  0.482
convergence code: 0
Model failed to converge with max|grad| = 0.216916 (tol = 0.001, component 1)
Model is nearly unidentifiable: very large eigenvalue
- Rescale variables?
Model is nearly unidentifiable: large eigenvalue ratio
- Rescale variables?

M2:

Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
Family: Gamma  ( log )
Formula: BL ~ Gender + Year + TR + T4 + R5 + Sun + (1 | Group) + (1 |      fYear)
Data: AT_St
Control: glmerControl(check.conv.singular = .makeCC(action = "ignore",
tol = 1e-04), optimizer = "bobyqa", optCtrl = list(maxfun = 2e+05))

AIC      BIC   logLik deviance df.resid
19114.1  19174.4  -9547.0  19094.1     3080

Scaled residuals:
Min       1Q   Median       3Q      Max
-2.82972 -0.70170 -0.01325  0.66048  3.13209

Random effects:
Groups   Name        Variance  Std.Dev.
fYear    (Intercept) 9.385e-05 0.009688
Group    (Intercept) 2.480e-04 0.015749
Residual             3.349e-03 0.057872
Number of obs: 3090, groups:  fYear, 20; Group, 6

Fixed effects:
Estimate Std. Error t value Pr(>|z|)
(Intercept)   0.1029023  0.3869789   0.266    0.790
GenderFemale -0.0222147  0.0747871  -0.297    0.766
Year          0.0022150  0.0001919  11.540   <2e-16 ***
TR            0.0074943  0.0059709   1.255    0.209
T4            0.0102481  0.0066042   1.552    0.121
R5           -0.0006590  0.0065327  -0.101    0.920
Sun          -0.0013737  0.0055412  -0.248    0.804
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
(Intr) GndrFm Year   TR     T4     R5
GenderFemal -0.093
Year        -0.988 -0.014
TR           0.081 -0.048 -0.043
T4           0.082  0.022 -0.081 -0.323
R5          -0.048  0.015  0.045 -0.216 -0.026
Sun         -0.047 -0.004  0.047 -0.077 -0.244  0.350
convergence code: 0
Model failed to converge with max|grad| = 0.690565 (tol = 0.001, component 1)
Model is nearly unidentifiable: very large eigenvalue
- Rescale variables?
Model is nearly unidentifiable: large eigenvalue ratio
- Rescale variables?

M3:

Family: Gamma

Formula:
BL ~ Gender + TR + T4 + R5 + Sun + s(Group, bs = "re", k = 6) +
s(Year, bs = "tp", k = 20) + s(fYear, bs = "re")

Parametric coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)   4.5507217  0.0482135  94.387   <2e-16 ***
GenderFemale -0.0219563  0.0680126  -0.323    0.747
TR            0.0051556  0.0046525   1.108    0.268
T4            0.0030441  0.0053974   0.564    0.573
R5           -0.0010902  0.0044934  -0.243    0.808
Sun          -0.0003641  0.0041028  -0.089    0.929
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Approximate significance of smooth terms:
edf Ref.df        F  p-value
s(Group)  3.996  4.000 1215.456  < 2e-16 ***
s(Year)   2.984  3.059    5.301 0.000991 ***
s(fYear) 10.672 14.000   10.240 2.82e-11 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

R-sq.(adj) =  0.661   Deviance explained = 66.2%
-REML = 9594.6  Scale est. = 0.0032066  n = 3090