D_methods.srafit: Overloaded functions for "srafit" objects

4. Methods for srafit objects R Documentation

Overloaded functions for "srafit" objects

Description

The functions return the output expected from the corresponding R functions, applied to an object of class srafit.

Usage

## S3 method for class 'srafit'
logLik(object, ...)
## S3 method for class 'srafit'
AIC(object, ...)
## S3 method for class 'srafit'
coef(object, ...)
## S3 method for class 'srafit'
confint(object, ...)
## S3 method for class 'srafit'
vcov(object, ...)

Arguments

object

An object of class srafit.

...

Any additional parameters to the corresponding functions.

Details

The confidence intervals are calculated from the estimate standard errors, and are thus different (less precise) from what would be calculated from the profile likelihood.

See Also

sraAutoreg, sraCstvar and other mechanistic models, AIC, coef, logLik, confint, vcov.

Examples

########### Generating a dummy dataset ################

m <- c(12,11,12,14,18,17,19,22,20,19)
v <- c(53,47,97,155,150,102,65,144,179,126)
s <- c(15,14,14,17,21,20,22,25,24,NA)
n <- c(100,80,120,60,100,90,110,80,60,100)

########## Making a sra data set #######################
data <- sraData(phen.mean=m, phen.var=v, phen.sel=s, N=n)

#################### Data Analysis ####################

cstvar <- sraCstvar(data)

AIC(cstvar)
logLik(cstvar)
coef(cstvar)
confint(cstvar)
vcov(cstvar)

sra documentation built on March 31, 2023, 9:31 p.m.