Serie temporal

302 observaciones de 6 variables bioquímicas (pH, oxígeno disuelto, DBO, Na, Namon) en tres zonas. En cada zona, 2 o 3 puntos de muestreo que se siguieron en el tiempo, de 2003 a 2015. Dataset completo, se imputaron datos faltantes por random forest y datos censurados por izquierda (zCompositions)

Estadística descriptiva

Cantidad de muestreos por zona, año, mes

zona anio Total
2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
1-GALVAN 14 4 4 5 9 8 7 15 8 19 10 11 7 121
2-WHITE 22 5 2 2 8 15 17 11 8 16 12 13 9 140
3-BELGRyROS 0 0 0 3 3 4 7 4 3 8 6 1 2 41
Total 36 9 6 10 20 27 31 30 19 43 28 25 18 302
zona lugar Total
Oleaginosa Moreno Sector cangrejales Terminal 5 y 6 Pto.
Galvan
ADM Agro MMC TBB B20 y B21 y
Vaciadero
E/ B23 y B 24
1-GALVAN 22 59 40 0 0 0 0 0 121
2-WHITE 0 0 0 32 41 67 0 0 140
3-BELGRyROS 0 0 0 0 0 0 26 15 41
Total 22 59 40 32 41 67 26 15 302

pH

  • Missing: 1 (0.3%).
  • Datos censurados: 0

Gráficos de perfiles

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Modelos temporales - GAM

Usamos Cyclic cubic regression splines (cc): - uses knots - can only be used for single covariates - computationally less expensive - has the same start and end point, e.g. for modelling seasonality

Smooth functions are usually centered to mean zero taken over the set of covariate values

R2-value is as usual the proportion of variance explained by the model.

Scale estimate is the variance of the residual.

the p-values are only approximate and should be handled with care.

edf (effective degrees of freedom). I.e, edf = 3 indicates that the fit is similar to a GLM with a cubic function.

Modelo 1. sin factor aleat (lugar) sin interacción

## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## ph_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona
## 
## Parametric coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      7.87122    0.02096 375.470   <2e-16 ***
## zona2-WHITE     -0.01377    0.02883  -0.478    0.633    
## zona3-BELGRyROS  0.05565    0.04230   1.316    0.189    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##           edf Ref.df     F  p-value    
## s(mes)  1.912  2.000 18.16 1.46e-08 ***
## s(anio) 9.005  9.587 28.38  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =   0.53   Deviance explained = 55.1%
## GCV = 0.054646  Scale est. = 0.052128  n = 302
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## ph_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona
## 
## Parametric Terms:
##      df     F p-value
## zona  2 1.386   0.252
## 
## Approximate significance of smooth terms:
##           edf Ref.df     F  p-value
## s(mes)  1.912  2.000 18.16 1.46e-08
## s(anio) 9.005  9.587 28.38  < 2e-16
## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; with 30 values ranging from 1.000000 to 12.000000. 
##  * anio : numeric predictor; set to the value(s): 2010.

## 
## Method: GCV   Optimizer: magic
## Smoothing parameter selection converged after 6 iterations.
## The RMS GCV score gradient at convergence was 1.650149e-06 .
## The Hessian was positive definite.
## Model rank =  16 / 16 
## 
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
## 
##            k'   edf k-index p-value    
## s(mes)   2.00  1.91    0.53  <2e-16 ***
## s(anio) 11.00  9.01    0.55  <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## Modelo 2. Con aleat con interacción año x zona

## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## ph_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12, 
##     by = zona) + zona + s(lugar, bs = "re")
## 
## Parametric coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      7.86680    0.02101 374.384   <2e-16 ***
## zona2-WHITE     -0.01019    0.02875  -0.354    0.723    
## zona3-BELGRyROS  0.07656    0.49820   0.154    0.878    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##                               edf Ref.df     F  p-value    
## s(mes)                  1.897e+00  2.000 17.07 3.58e-08 ***
## s(anio):zona1-GALVAN    8.082e+00  8.874 12.60  < 2e-16 ***
## s(anio):zona2-WHITE     8.596e+00  9.246 11.76  < 2e-16 ***
## s(anio):zona3-BELGRyROS 6.342e+00  6.907 10.84 2.67e-12 ***
## s(lugar)                6.063e-09  7.000  0.00    0.792    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =  0.542   Deviance explained = 58.3%
## GCV = 0.056038  Scale est. = 0.050858  n = 302
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## ph_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12, 
##     by = zona) + zona + s(lugar, bs = "re")
## 
## Parametric Terms:
##      df     F p-value
## zona  2 0.076   0.926
## 
## Approximate significance of smooth terms:
##                               edf    Ref.df     F  p-value
## s(mes)                  1.897e+00 2.000e+00 17.07 3.58e-08
## s(anio):zona1-GALVAN    8.082e+00 8.874e+00 12.60  < 2e-16
## s(anio):zona2-WHITE     8.596e+00 9.246e+00 11.76  < 2e-16
## s(anio):zona3-BELGRyROS 6.342e+00 6.907e+00 10.84 2.67e-12
## s(lugar)                6.063e-09 7.000e+00  0.00    0.792
## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000. 
##  * lugar : factor; set to the value(s): TBB.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000. 
##  * lugar : factor; set to the value(s): TBB.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; with 30 values ranging from 1.000000 to 12.000000. 
##  * anio : numeric predictor; set to the value(s): 2010. 
##  * lugar : factor; set to the value(s): TBB.

## 
## Method: GCV   Optimizer: magic
## Smoothing parameter selection converged after 14 iterations.
## The RMS GCV score gradient at convergence was 3.672533e-08 .
## The Hessian was positive definite.
## Model rank =  46 / 46 
## 
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
## 
##                               k'      edf k-index p-value    
## s(mes)                  2.00e+00 1.90e+00    0.49  <2e-16 ***
## s(anio):zona1-GALVAN    1.10e+01 8.08e+00    0.50  <2e-16 ***
## s(anio):zona2-WHITE     1.10e+01 8.60e+00    0.50  <2e-16 ***
## s(anio):zona3-BELGRyROS 1.10e+01 6.34e+00    0.50  <2e-16 ***
## s(lugar)                8.00e+00 6.06e-09      NA      NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##     s(mes)    s(anio) 
## 0.07272963 1.38608596

Modelo 3. Con aleat sin inter año x zona

## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## ph_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona + s(lugar, bs = "re")
## 
## Parametric coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      7.87122    0.02096 375.470   <2e-16 ***
## zona2-WHITE     -0.01377    0.02883  -0.478    0.633    
## zona3-BELGRyROS  0.05565    0.04230   1.316    0.189    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##                edf Ref.df     F  p-value    
## s(mes)   1.912e+00  2.000 18.16 1.46e-08 ***
## s(anio)  9.005e+00  9.587 28.38  < 2e-16 ***
## s(lugar) 9.102e-09  6.000  0.00    0.961    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =   0.53   Deviance explained = 55.1%
## GCV = 0.054646  Scale est. = 0.052128  n = 302
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## ph_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona + s(lugar, bs = "re")
## 
## Parametric Terms:
##      df     F p-value
## zona  2 1.386   0.252
## 
## Approximate significance of smooth terms:
##                edf    Ref.df     F  p-value
## s(mes)   1.912e+00 2.000e+00 18.16 1.46e-08
## s(anio)  9.005e+00 9.587e+00 28.38  < 2e-16
## s(lugar) 9.102e-09 6.000e+00  0.00    0.961
## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000. 
##  * lugar : factor; set to the value(s): TBB.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; with 30 values ranging from 1.000000 to 12.000000. 
##  * anio : numeric predictor; set to the value(s): 2010. 
##  * lugar : factor; set to the value(s): TBB.

## 
## Method: GCV   Optimizer: magic
## Smoothing parameter selection converged after 7 iterations.
## The RMS GCV score gradient at convergence was 2.485368e-07 .
## The Hessian was positive definite.
## Model rank =  24 / 24 
## 
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
## 
##                k'      edf k-index p-value    
## s(mes)   2.00e+00 1.91e+00    0.53  <2e-16 ***
## s(anio)  1.10e+01 9.01e+00    0.55  <2e-16 ***
## s(lugar) 8.00e+00 9.10e-09      NA      NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##     s(mes)    s(anio) 
## 0.07272963 1.38608596
##           df       AIC
## m1  14.91695 -19.49948
## m10 28.91714 -13.99359
## m11 14.91720 -19.49950
  ph_imp
Predictors Estimates CI p
(Intercept) 7.87 7.83 – 7.91 <0.001
zona (2-WHITE) -0.01 -0.07 – 0.04 0.633
zona (3-BELGRyROS) 0.06 -0.03 – 0.14 0.189
Smooth term (mes) 1.91 <0.001
Smooth term (anio) 9.01 <0.001
Observations 302
R2 Nagelkerke 0.564
  • Interacción NS.Factor aleatorio no parece aportar. No hay diferencias entre sitios, pero sí entre años y meses => m1

DBO

  • Missing: 1 (0.3%).
  • Datos censurados: 53%

Gráficos de perfiles

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Modelos temporales - GAM

Modelo 1. sin factor aleat (lugar) sin interacción

## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## dbo_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona
## 
## Parametric coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      10.0022     0.5253  19.040   <2e-16 ***
## zona2-WHITE      -0.2973     0.7221  -0.412    0.681    
## zona3-BELGRyROS  -0.5639     1.0569  -0.534    0.594    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##           edf Ref.df      F p-value    
## s(mes)  1.425  2.000  2.899  0.0177 *  
## s(anio) 7.345  8.263 53.530  <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =    0.6   Deviance explained = 61.4%
## GCV = 34.167  Scale est. = 32.835    n = 302
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## dbo_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona
## 
## Parametric Terms:
##      df    F p-value
## zona  2 0.17   0.844
## 
## Approximate significance of smooth terms:
##           edf Ref.df      F p-value
## s(mes)  1.425  2.000  2.899  0.0177
## s(anio) 7.345  8.263 53.530  <2e-16
## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; with 30 values ranging from 1.000000 to 12.000000. 
##  * anio : numeric predictor; set to the value(s): 2010.

## 
## Method: GCV   Optimizer: magic
## Smoothing parameter selection converged after 6 iterations.
## The RMS GCV score gradient at convergence was 6.336818e-05 .
## The Hessian was positive definite.
## Model rank =  16 / 16 
## 
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
## 
##            k'   edf k-index p-value    
## s(mes)   2.00  1.43    0.80  <2e-16 ***
## s(anio) 11.00  7.35    0.78  <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Modelo 2. Con aleat con interacción año x zona

## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## dbo_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12, 
##     by = zona) + zona + s(lugar, bs = "re")
## 
## Parametric coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      10.1228     0.5755  17.590   <2e-16 ***
## zona2-WHITE      -0.5197     0.7911  -0.657    0.512    
## zona3-BELGRyROS -12.3749    34.3970  -0.360    0.719    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##                            edf Ref.df      F  p-value    
## s(mes)                  1.1793  2.000  2.162   0.0264 *  
## s(anio):zona1-GALVAN    6.1751  7.165 28.366  < 2e-16 ***
## s(anio):zona2-WHITE     6.6608  7.615 34.479  < 2e-16 ***
## s(anio):zona3-BELGRyROS 7.3008  7.672  4.928 9.54e-06 ***
## s(lugar)                0.8067  5.000  0.212   0.2549    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =  0.634   Deviance explained = 66.3%
## GCV = 32.775  Scale est. = 30.049    n = 302
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## dbo_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12, 
##     by = zona) + zona + s(lugar, bs = "re")
## 
## Parametric Terms:
##      df     F p-value
## zona  2 0.278   0.758
## 
## Approximate significance of smooth terms:
##                            edf Ref.df      F  p-value
## s(mes)                  1.1793 2.0000  2.162   0.0264
## s(anio):zona1-GALVAN    6.1751 7.1651 28.366  < 2e-16
## s(anio):zona2-WHITE     6.6608 7.6151 34.479  < 2e-16
## s(anio):zona3-BELGRyROS 7.3008 7.6718  4.928 9.54e-06
## s(lugar)                0.8067 5.0000  0.212   0.2549
## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000. 
##  * lugar : factor; set to the value(s): TBB.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000. 
##  * lugar : factor; set to the value(s): TBB.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; with 30 values ranging from 1.000000 to 12.000000. 
##  * anio : numeric predictor; set to the value(s): 2010. 
##  * lugar : factor; set to the value(s): TBB.

## 
## Method: GCV   Optimizer: magic
## Smoothing parameter selection converged after 8 iterations.
## The RMS GCV score gradient at convergence was 5.329104e-06 .
## The Hessian was positive definite.
## Model rank =  46 / 46 
## 
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
## 
##                             k'    edf k-index p-value    
## s(mes)                   2.000  1.179    0.72  <2e-16 ***
## s(anio):zona1-GALVAN    11.000  6.175    0.66  <2e-16 ***
## s(anio):zona2-WHITE     11.000  6.661    0.66  <2e-16 ***
## s(anio):zona3-BELGRyROS 11.000  7.301    0.66  <2e-16 ***
## s(lugar)                 8.000  0.807      NA      NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##     s(mes)    s(anio) 
##  0.6098124 11.3243255

Modelo 3. Con aleat sin inter año x zona

## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## dbo_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona + s(lugar, bs = "re")
## 
## Parametric coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      10.0022     0.5253  19.040   <2e-16 ***
## zona2-WHITE      -0.2973     0.7221  -0.412    0.681    
## zona3-BELGRyROS  -0.5639     1.0569  -0.534    0.594    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##                edf Ref.df      F p-value    
## s(mes)   1.425e+00  2.000  2.899  0.0177 *  
## s(anio)  7.345e+00  8.263 53.530  <2e-16 ***
## s(lugar) 2.387e-09  6.000  0.000  0.4537    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =    0.6   Deviance explained = 61.4%
## GCV = 34.167  Scale est. = 32.835    n = 302
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## dbo_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona + s(lugar, bs = "re")
## 
## Parametric Terms:
##      df    F p-value
## zona  2 0.17   0.844
## 
## Approximate significance of smooth terms:
##                edf    Ref.df      F p-value
## s(mes)   1.425e+00 2.000e+00  2.899  0.0177
## s(anio)  7.345e+00 8.263e+00 53.530  <2e-16
## s(lugar) 2.387e-09 6.000e+00  0.000  0.4537
## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000. 
##  * lugar : factor; set to the value(s): TBB.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; with 30 values ranging from 1.000000 to 12.000000. 
##  * anio : numeric predictor; set to the value(s): 2010. 
##  * lugar : factor; set to the value(s): TBB.

## 
## Method: GCV   Optimizer: magic
## Smoothing parameter selection converged after 12 iterations.
## The RMS GCV score gradient at convergence was 1.663502e-06 .
## The Hessian was positive definite.
## Model rank =  24 / 24 
## 
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
## 
##                k'      edf k-index p-value    
## s(mes)   2.00e+00 1.43e+00    0.80  <2e-16 ***
## s(anio)  1.10e+01 7.35e+00    0.78  <2e-16 ***
## s(lugar) 8.00e+00 2.39e-09      NA      NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##     s(mes)    s(anio) 
##  0.6098124 11.3243255
##           df      AIC
## m1  12.77031 1925.008
## m10 26.12279 1910.707
## m11 12.77031 1925.008
  dbo_imp
Predictors Estimates CI p
(Intercept) 10.00 8.97 – 11.04 <0.001
zona (2-WHITE) -0.30 -1.72 – 1.12 0.681
zona (3-BELGRyROS) -0.56 -2.64 – 1.52 0.594
Smooth term (mes) 1.43 0.018
Smooth term (anio) 7.35 <0.001
Observations 302
R2 Nagelkerke 1.000
  • Modelar varianzas. datos censurados

Oxígeno disuelto

  • Missing: 9 (2.98%)
  • Datos censurados: 0%

Gráficos de perfiles

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Modelos temporales - GAM

Modelo 1. sin factor aleat (lugar) sin interacción

## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## odis_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona
## 
## Parametric coefficients:
##                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      7.037265   0.095235  73.893  < 2e-16 ***
## zona2-WHITE     -0.004527   0.130958  -0.035  0.97245    
## zona3-BELGRyROS  0.591462   0.192390   3.074  0.00231 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##           edf Ref.df     F p-value    
## s(mes)  1.981   2.00 73.49  <2e-16 ***
## s(anio) 9.926  10.45 46.45  <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =  0.708   Deviance explained = 72.1%
## GCV = 1.1305  Scale est. = 1.0747    n = 302
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## odis_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona
## 
## Parametric Terms:
##      df     F p-value
## zona  2 5.476 0.00463
## 
## Approximate significance of smooth terms:
##            edf Ref.df     F p-value
## s(mes)   1.981  2.000 73.49  <2e-16
## s(anio)  9.926 10.446 46.45  <2e-16
## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; with 30 values ranging from 1.000000 to 12.000000. 
##  * anio : numeric predictor; set to the value(s): 2010.

## 
## Method: GCV   Optimizer: magic
## Smoothing parameter selection converged after 7 iterations.
## The RMS GCV score gradient at convergence was 3.402339e-06 .
## The Hessian was positive definite.
## Model rank =  16 / 16 
## 
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
## 
##            k'   edf k-index p-value    
## s(mes)   2.00  1.98    0.38  <2e-16 ***
## s(anio) 11.00  9.93    0.42  <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Modelo 2. Con aleat con interacción año x zona

## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## odis_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12, 
##     by = zona) + zona + s(lugar, bs = "re")
## 
## Parametric coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      6.99657    0.09733  71.884   <2e-16 ***
## zona2-WHITE      0.01547    0.13321   0.116    0.908    
## zona3-BELGRyROS  0.80124    1.74408   0.459    0.646    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##                               edf Ref.df     F  p-value    
## s(mes)                  1.990e+00  2.000 63.67  < 2e-16 ***
## s(anio):zona1-GALVAN    7.484e+00  8.393 20.81  < 2e-16 ***
## s(anio):zona2-WHITE     8.204e+00  8.944 24.44  < 2e-16 ***
## s(anio):zona3-BELGRyROS 5.956e+00  6.617 12.12 2.85e-13 ***
## s(lugar)                8.169e-10  8.000  0.00    0.629    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =  0.703   Deviance explained = 72.8%
## GCV = 1.1996  Scale est. = 1.0938    n = 302
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## odis_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12, 
##     by = zona) + zona + s(lugar, bs = "re")
## 
## Parametric Terms:
##      df    F p-value
## zona  2 0.11   0.896
## 
## Approximate significance of smooth terms:
##                               edf    Ref.df     F  p-value
## s(mes)                  1.990e+00 2.000e+00 63.67  < 2e-16
## s(anio):zona1-GALVAN    7.484e+00 8.393e+00 20.81  < 2e-16
## s(anio):zona2-WHITE     8.204e+00 8.944e+00 24.44  < 2e-16
## s(anio):zona3-BELGRyROS 5.956e+00 6.617e+00 12.12 2.85e-13
## s(lugar)                8.169e-10 8.000e+00  0.00    0.629
## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000. 
##  * lugar : factor; set to the value(s): TBB.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000. 
##  * lugar : factor; set to the value(s): TBB.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; with 30 values ranging from 1.000000 to 12.000000. 
##  * anio : numeric predictor; set to the value(s): 2010. 
##  * lugar : factor; set to the value(s): TBB.

## 
## Method: GCV   Optimizer: magic
## Smoothing parameter selection converged after 14 iterations.
## The RMS GCV score gradient at convergence was 6.641957e-08 .
## The Hessian was positive definite.
## Model rank =  46 / 46 
## 
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
## 
##                               k'      edf k-index p-value    
## s(mes)                  2.00e+00 1.99e+00    0.39  <2e-16 ***
## s(anio):zona1-GALVAN    1.10e+01 7.48e+00    0.43  <2e-16 ***
## s(anio):zona2-WHITE     1.10e+01 8.20e+00    0.43  <2e-16 ***
## s(anio):zona3-BELGRyROS 1.10e+01 5.96e+00    0.43  <2e-16 ***
## s(lugar)                8.00e+00 8.17e-10      NA      NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##     s(mes)    s(anio) 
##  0.7381032 14.5303443

Modelo 3. Con aleat sin inter año x zona

## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## odis_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona + s(lugar, bs = "re")
## 
## Parametric coefficients:
##                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      7.037274   0.095234  73.895  < 2e-16 ***
## zona2-WHITE     -0.004538   0.130956  -0.035  0.97238    
## zona3-BELGRyROS  0.591428   0.192387   3.074  0.00231 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Approximate significance of smooth terms:
##                edf Ref.df     F p-value    
## s(mes)   1.981e+00   2.00 73.49  <2e-16 ***
## s(anio)  9.929e+00  10.45 46.45  <2e-16 ***
## s(lugar) 7.268e-10   8.00  0.00   0.897    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## R-sq.(adj) =  0.708   Deviance explained = 72.1%
## GCV = 1.1305  Scale est. = 1.0747    n = 302
## 
## Family: gaussian 
## Link function: identity 
## 
## Formula:
## odis_imp ~ s(mes, bs = "cc", k = 4) + s(anio, bs = "ps", k = 12) + 
##     zona + s(lugar, bs = "re")
## 
## Parametric Terms:
##      df     F p-value
## zona  2 5.476 0.00464
## 
## Approximate significance of smooth terms:
##                edf    Ref.df     F p-value
## s(mes)   1.981e+00 2.000e+00 73.49  <2e-16
## s(anio)  9.929e+00 1.045e+01 46.45  <2e-16
## s(lugar) 7.268e-10 8.000e+00  0.00   0.897
## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; set to the value(s): 6. 
##  * anio : numeric predictor; with 30 values ranging from 2003.000000 to 2015.000000. 
##  * lugar : factor; set to the value(s): TBB.

## Summary:
##  * zona : factor; set to the value(s): 1-GALVAN, 2-WHITE, 3-BELGRyROS. 
##  * mes : numeric predictor; with 30 values ranging from 1.000000 to 12.000000. 
##  * anio : numeric predictor; set to the value(s): 2010. 
##  * lugar : factor; set to the value(s): TBB.

## 
## Method: GCV   Optimizer: magic
## Smoothing parameter selection converged after 12 iterations.
## The RMS GCV score gradient at convergence was 1.359304e-07 .
## The Hessian was positive definite.
## Model rank =  24 / 24 
## 
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
## 
##                k'      edf k-index p-value    
## s(mes)   2.00e+00 1.98e+00    0.38  <2e-16 ***
## s(anio)  1.10e+01 9.93e+00    0.43  <2e-16 ***
## s(lugar) 8.00e+00 7.27e-10      NA      NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##     s(mes)    s(anio) 
##  0.7381032 14.5303443
##           df      AIC
## m1  15.90773 895.3262
## m10 27.63393 911.4995
## m11 15.91062 895.3189
  odis_imp
Predictors Estimates CI p
(Intercept) 7.04 6.85 – 7.22 <0.001
zona (2-WHITE) -0.00 -0.26 – 0.25 0.972
zona (3-BELGRyROS) 0.59 0.21 – 0.97 0.002
Smooth term (mes) 1.98 <0.001
Smooth term (anio) 9.93 <0.001
Observations 302
R2 Nagelkerke 0.953
  • No interacción. Diferencias entre zonas

NAMON 24% NA 27% p 15%