ic_reml_spt {agriutilities}R Documentation

Find the AIC and BIC for a model fitted using SpATS

Description

This function calculates the AIC and BIC for a model fitted in SpATS following the methodology proposed by Verbyla (2019).

Usage

ic_reml_spt(model, scale = 1, k = 2, label = "spats")

Arguments

model

A model fitted using SpATS.

scale

A scalar to scale the variance matrix of the estimated fixed effects (to ensure numerical stability of a log-determinant). Default value is 1.

k

An integer value to round ratios when identifying boundary variance parameters. Default value is 2.

label

A string to label the model. Default value is "spats".

Value

A data frame. The data frame has the following components

Author(s)

Johan Aparicio

References

Verbyla, A. P. (2019). A note on model selection using information criteria for general linear models estimated using REML. Australian & New Zealand Journal of Statistics, 61(1), 39-50.

Examples


library(SpATS)
library(agriutilities)
data(wheatdata)
wheatdata$R <- as.factor(wheatdata$row)
wheatdata$C <- as.factor(wheatdata$col)

m1 <- SpATS(
  response = "yield",
  spatial = ~ PSANOVA(col, row, nseg = c(10, 20), nest.div = 2),
  genotype = "geno",
  genotype.as.random = TRUE,
  fixed = ~ colcode + rowcode,
  random = ~ R + C,
  data = wheatdata,
  control = list(tolerance = 1e-03, monitoring = 0)
)

m2 <- SpATS(
  response = "yield",
  spatial = ~ PSANOVA(col, row, nseg = c(10, 20), nest.div = 2),
  genotype = "geno",
  genotype.as.random = TRUE,
  fixed = ~colcode,
  random = ~ R + C,
  data = wheatdata,
  control = list(tolerance = 1e-03, monitoring = 0)
)

rbind.data.frame(
  ic_reml_spt(m1, label = "colcode_rowcode"),
  ic_reml_spt(m2, label = "colcode_no_rowcode")
)

rbind.data.frame(
  h_cullis_spt(m1),
  h_cullis_spt(m2)
)


[Package agriutilities version 1.2.1 Index]