akaike.l: Loess regression parameters selection through AIC...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function calculates the Akaike Information Criteron (AIC) of LOESS regressions with varying α and degree for a single taxon.

Usage

1
2
akaike.l(x, y, interval = c(0.15, 1, 0.05), plot = TRUE,
        parameters = FALSE)

Arguments

x

A vector containing the environmental gradient value for each sample or location.

y

A matrix containing the observed taxa abundances along the environmental gradient. Taxa are in columns and samples in rows.

interval

α values to be evaluated. Three numbers in the following order: lower and upper limits of the sequence of α values to be evaluated, and increment of the sequence.

plot

Logical indicating whether or not a figure displaying the behavior of AIC through α values conditioned to degree is plotted.

parameters

Logical indicating whether or not a matrix with the parameters of each LOESS regression is desired.

Details

AIC is calculated according to Hurvich & Simonoff (1998) for LOESS regressions (Cleveland and Devlin, 1988) generated through all possible combinations between degree (1 and 2) and the generated series of α values.

Value

A list with two components containing:

aic.loess

A matrix with the AIC values for each combination of α and degree.

minimum

The values of α and degree that minimize AIC.

minimum

A matrix containing all the parameters of the LOESS regression for each combination of α and degree (see Cleveland and Devlin (1988) and Hurvich & Simonoff (1998) for details). Only relevant if parameters=TRUE.

Author(s)

Alexander Correa-Metrio, Kenneth R. Cabrera.

References

Correa-Metrio, A., M.B. Bush, L.Perez, A. Schwalb, and K. Cabrera. Accepted. Pollen distribution along climatic and biogeographic gradients in northern Central America. The Holocene

Hurvich, C.M., and J.S. Simonoff. 1998. Smoothing parameters selection in nonparametric regression using an improved Akaike information criterion. Journal of the Royal Society, Series B 60: 271-293.

Cleveland, W.S., and S.J. Devlin. 1988. Locally weighted regression: An approach to regression analysis by local fitting. Journal of the American Statistical Association 83: 596-610.

See Also

loess for details on LOESS regression.

Examples

1
2
3
4
5
data(modernq)
# Calculate percentages
perq<-percenta(modernq,first=2,last=39)[,2:55]
akaike.l(modernq[,1],perq[,3])
akaike.l(modernq[,1],perq[,3],parameters=TRUE)

Example output

Loading required package: MASS
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-4
$aic.loess
      alpha degree       AIC
 [1,]  0.15      1 106.93116
 [2,]  0.20      1  84.28312
 [3,]  0.25      1  79.11002
 [4,]  0.30      1  77.40905
 [5,]  0.35      1  76.09571
 [6,]  0.40      1  73.50195
 [7,]  0.45      1  72.23260
 [8,]  0.50      1  70.43509
 [9,]  0.55      1  71.12448
[10,]  0.60      1  70.68233
[11,]  0.65      1  70.62503
[12,]  0.70      1  70.43165
[13,]  0.75      1  70.26693
[14,]  0.80      1  70.05504
[15,]  0.85      1  69.34605
[16,]  0.90      1  69.38991
[17,]  0.95      1  69.24309
[18,]  1.00      1  69.26148
[19,]  0.15      2 127.21101
[20,]  0.20      2 103.04766
[21,]  0.25      2  88.58708
[22,]  0.30      2  82.59357
[23,]  0.35      2  83.29402
[24,]  0.40      2  76.85976
[25,]  0.45      2  75.90943
[26,]  0.50      2  74.00449
[27,]  0.55      2  72.69329
[28,]  0.60      2  72.53719
[29,]  0.65      2  72.15040
[30,]  0.70      2  71.22032
[31,]  0.75      2  70.85741
[32,]  0.80      2  70.54810
[33,]  0.85      2  71.16889
[34,]  0.90      2  71.23999
[35,]  0.95      2  71.39417
[36,]  1.00      2  71.43475

$minimum
   alpha   degree      AIC 
 0.95000  1.00000 69.24309 

Warning messages:
1: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  pseudoinverse used at 395
2: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  neighborhood radius 5
3: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  reciprocal condition number  0
4: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  pseudoinverse used at 581.48
5: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  neighborhood radius 63.475
6: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  reciprocal condition number  0
7: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  There are other near singularities as well. 25
$l.p
      alpha degree  n        s2       d1       d2     tr(H)
 [1,]  0.15      1 53 0.7542827 32.65245 31.67125 17.625258
 [2,]  0.20      1 53 0.9059603 40.00043 39.44380 11.230018
 [3,]  0.25      1 53 0.9676015 42.60183 42.16101  8.972785
 [4,]  0.30      1 53 0.9849199 43.47026 43.06600  8.226904
 [5,]  0.35      1 53 1.0245007 44.64652 44.28912  7.220840
 [6,]  0.40      1 53 1.0548098 46.16994 45.86496  5.916849
 [7,]  0.45      1 53 1.0592367 46.74729 46.46071  5.426010
 [8,]  0.50      1 53 1.0715238 47.71354 47.45478  4.607338
 [9,]  0.55      1 53 1.1203558 48.41097 48.16980  4.019991
[10,]  0.60      1 53 1.1210714 48.61381 48.37740  3.850126
[11,]  0.65      1 53 1.1324036 48.86821 48.63754  3.637834
[12,]  0.70      1 53 1.1430465 49.16939 48.94518  3.387844
[13,]  0.75      1 53 1.1462813 49.30830 49.08684  3.272932
[14,]  0.80      1 53 1.1478474 49.43460 49.21539  3.168559
[15,]  0.85      1 53 1.1536286 49.87524 49.66381  2.808654
[16,]  0.90      1 53 1.1566843 49.91954 49.70909  2.773110
[17,]  0.95      1 53 1.1598812 50.05539 49.84849  2.665199
[18,]  1.00      1 53 1.1634415 50.12279 49.91807  2.612331
[19,]  0.15      2 53 0.5725706 27.67552 26.74262 23.143171
[20,]  0.20      2 53 0.7791490 34.01306 33.28060 17.326281
[21,]  0.25      2 53 0.8427761 38.10937 37.51042 13.589728
[22,]  0.30      2 53 0.8600988 39.94951 39.40550 11.905183
[23,]  0.35      2 53 0.9581522 41.37750 40.87989 10.607264
[24,]  0.40      2 53 0.9685371 43.55763 43.12773  8.624014
[25,]  0.45      2 53 0.9748333 43.98705 43.57032  8.233913
[26,]  0.50      2 53 0.9985407 45.08172 44.69925  7.242117
[27,]  0.55      2 53 1.0197354 45.95614 45.60031  6.450890
[28,]  0.60      2 53 1.0383470 46.37055 46.02726  6.076739
[29,]  0.65      2 53 1.0513240 46.76656 46.43529  5.719981
[30,]  0.70      2 53 1.0671717 47.43615 47.12532  5.119046
[31,]  0.75      2 53 1.0701488 47.63876 47.33415  4.937959
[32,]  0.80      2 53 1.0728738 47.81655 47.51730  4.779250
[33,]  0.85      2 53 1.1257005 48.60664 48.33089  4.079243
[34,]  0.90      2 53 1.1301357 48.66442 48.39080  4.028945
[35,]  0.95      2 53 1.1467921 48.92906 48.66706  3.801402
[36,]  1.00      2 53 1.1540854 49.05695 48.80211  3.693429

$aic.loess
      alpha degree       AIC
 [1,]  0.15      1 106.93116
 [2,]  0.20      1  84.28312
 [3,]  0.25      1  79.11002
 [4,]  0.30      1  77.40905
 [5,]  0.35      1  76.09571
 [6,]  0.40      1  73.50195
 [7,]  0.45      1  72.23260
 [8,]  0.50      1  70.43509
 [9,]  0.55      1  71.12448
[10,]  0.60      1  70.68233
[11,]  0.65      1  70.62503
[12,]  0.70      1  70.43165
[13,]  0.75      1  70.26693
[14,]  0.80      1  70.05504
[15,]  0.85      1  69.34605
[16,]  0.90      1  69.38991
[17,]  0.95      1  69.24309
[18,]  1.00      1  69.26148
[19,]  0.15      2 127.21101
[20,]  0.20      2 103.04766
[21,]  0.25      2  88.58708
[22,]  0.30      2  82.59357
[23,]  0.35      2  83.29402
[24,]  0.40      2  76.85976
[25,]  0.45      2  75.90943
[26,]  0.50      2  74.00449
[27,]  0.55      2  72.69329
[28,]  0.60      2  72.53719
[29,]  0.65      2  72.15040
[30,]  0.70      2  71.22032
[31,]  0.75      2  70.85741
[32,]  0.80      2  70.54810
[33,]  0.85      2  71.16889
[34,]  0.90      2  71.23999
[35,]  0.95      2  71.39417
[36,]  1.00      2  71.43475

$minimum
   alpha   degree      AIC 
 0.95000  1.00000 69.24309 

Warning messages:
1: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  pseudoinverse used at 395
2: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  neighborhood radius 5
3: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  reciprocal condition number  0
4: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  pseudoinverse used at 581.48
5: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  neighborhood radius 63.475
6: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  reciprocal condition number  0
7: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric,  :
  There are other near singularities as well. 25

paleoMAS documentation built on May 2, 2019, 6:46 a.m.