Extracts univariate standard errors for the estimated coefficient of B. Standard errors are computed from the (approximate) Fisher information matrix.

# S3 method for class 'PLNPCAfit'
standard_error(
  object,
  type = c("variational", "jackknife", "sandwich"),
  parameter = c("B", "Omega")
)

standard_error(
  object,
  type = c("sandwich", "variational", "jackknife"),
  parameter = c("B", "Omega")
)

# S3 method for class 'PLNfit'
standard_error(
  object,
  type = c("sandwich", "variational", "jackknife", "bootstrap"),
  parameter = c("B", "Omega")
)

# S3 method for class 'PLNfit_fixedcov'
standard_error(
  object,
  type = c("sandwich", "variational", "jackknife", "bootstrap"),
  parameter = c("B", "Omega")
)

# S3 method for class 'PLNmixturefit'
standard_error(
  object,
  type = c("variational", "jackknife", "sandwich"),
  parameter = c("B", "Omega")
)

# S3 method for class 'PLNnetworkfit'
standard_error(
  object,
  type = c("variational", "jackknife", "sandwich"),
  parameter = c("B", "Omega")
)

Arguments

object

an R6 object with class PLNfit

type

string describing the type of variance approximation: "variational", "jackknife", "sandwich". Default is "sandwich".

parameter

string describing the target parameter: either B (regression coefficients) or Omega (inverse residual covariance)

Value

A p * d positive matrix (same size as \(B\)) with standard errors for the coefficients of \(B\)

Methods (by class)

  • standard_error(PLNPCAfit): Component-wise standard errors of B in PLNPCAfit (not implemented yet)

  • standard_error(PLNfit): Component-wise standard errors of B in PLNfit

  • standard_error(PLNfit_fixedcov): Component-wise standard errors of B in PLNfit_fixedcov

  • standard_error(PLNmixturefit): Component-wise standard errors of B in PLNmixturefit (not implemented yet)

  • standard_error(PLNnetworkfit): Component-wise standard errors of B in PLNnetworkfit (not implemented yet)

See also

vcov.PLNfit() for the complete variance covariance estimation of the coefficient

Examples

data(trichoptera)
trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
myPLN <- PLN(Abundance ~ 1 + offset(log(Offset)), data = trichoptera,
              control = PLN_param(config_post = list(sandwich_var = TRUE)))
#> 
#>  Initialization...
#>  Adjusting a full covariance PLN model with nlopt optimizer
#>  Post-treatments...
#>  DONE!
standard_error(myPLN)
#>                   Che       Hyc       Hym       Hys        Psy       Aga
#> (Intercept) 0.6880663 0.5939557 0.1888002 0.4860979 0.04795397 0.2084701
#>                   Glo       Ath       Cea       Ced       Set       All
#> (Intercept) 0.3437327 0.3437914 0.2506917 0.1884151 0.2568735 0.2810084
#>                   Han       Hfo       Hsp       Hve       Sta
#> (Intercept) 0.3710332 0.3830626 0.2955706 0.4049102 0.1772968