poisson.regr.sl: Calculate level of smallest HDR which contains the modified...

Description Usage Arguments Value Examples

View source: R/internal.R

Description

Used for internal functions in the study of generalized fragility indices.

Usage

1
poisson.regr.sl(y, ymod, hatbeta, Xregr)

Arguments

y

a numeric vector of outcomes

hatbeta

a numeric vector of estimated coefficients

Xregr

a numeric matrix of covariates used to explain the outcomes

y.mod

a numeric vector of outcomes after the fragility index modification

Value

a scalar numeric: a ratio of the conditional likilihoods in y and y.mod, estimated using the MLE with the data y

Examples

1
2
3
y <- rpois(100, 1)
y.mod <- rpois(100, 1.2) # should be returned from an FI procedure
FragilityTools:::poisson.regr.sl(y, y.mod, 0, matrix(rnorm(100), ncol=100))

brb225/FragilityTools documentation built on Jan. 21, 2022, 1:26 a.m.