Skip to contents

Sigma = sigma2 * (rho * C + (1 - rho) * I_p), where C is a fixed p x p correlation matrix supplied by the user (control$C) and (sigma2, rho) are estimated. See GeneticCovTraits in src/covariance_pln.h for the C++ side.

Super class

PLNfit -> PLNfit_genpop

Active bindings

nb_param

number of parameters in the current PLN model

vcov_model

character: the model used for the residual covariance

gen_par

a list with the two extra parameters of the genpop covariance model: sigma2 (variance scale) and rho (mixing weight / heritability), decoded from Sigma and C.

Methods

Inherited methods


PLNfit_genpop$new()

Initialize a PLNfit_genpop model

Usage

PLNfit_genpop$new(responses, covariates, offsets, weights, formula, control)

Arguments

responses

the matrix of responses (called Y in the model). Will usually be extracted from the corresponding field in PLNfamily-class

covariates

design matrix (called X in the model). Will usually be extracted from the corresponding field in PLNfamily-class

offsets

offset matrix (called O in the model). Will usually be extracted from the corresponding field in PLNfamily-class

weights

an optional vector of observation weights to be used in the fitting process.

formula

model formula used for fitting, extracted from the formula in the upper-level call

control

a list for controlling the optimization, must include a field C (the fixed p x p correlation matrix). See details.


PLNfit_genpop$optimize()

Call to the NLopt or builtin optimizer and update of the relevant fields

Usage

PLNfit_genpop$optimize(responses, covariates, offsets, weights, config)

Arguments

responses

the matrix of responses (called Y in the model). Will usually be extracted from the corresponding field in PLNfamily-class

covariates

design matrix (called X in the model). Will usually be extracted from the corresponding field in PLNfamily-class

offsets

offset matrix (called O in the model). Will usually be extracted from the corresponding field in PLNfamily-class

weights

an optional vector of observation weights to be used in the fitting process.

config

part of the control argument which configures the optimizer


PLNfit_genpop$clone()

The objects of this class are cloneable with this method.

Usage

PLNfit_genpop$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # \dontrun{
data(trichoptera)
trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)
p <- ncol(trichoptera$Abundance)
C <- 0.5^abs(outer(1:p, 1:p, "-")); diag(C) <- 1
myPLN <- PLN(Abundance ~ 1, data = trichoptera, control = PLN_param(covariance = "genpop", C = C))
class(myPLN)
print(myPLN)
} # }