standard_error: Component-wise standard errors of B

View source: R/PLNfit-S3methods.R

standard_error.PLNPCAfitR Documentation

Component-wise standard errors of B

Description

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

Usage

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

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

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

## S3 method for class 'PLNfit_fixedcov'
standard_error(
  object,
  type = c("variational", "jackknife", "bootstrap", "sandwich"),
  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" (only for fixed covariance). Default is "variational".

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(variational_var = TRUE)))
standard_error(myPLN)

PLN-team/PLNmodels documentation built on Oct. 13, 2024, 4:01 a.m.