methods: Methods for '"LD"' models

Description Usage Arguments Author(s) See Also Examples

Description

Methods for models fitted by LD

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## predict function
## S3 method for class 'LD'
predict(object, group = NULL,
        type = c("response", "link", "terms", "lpmatrix"),
        newdata = NULL, ...)

## print function
## S3 method for class 'LD'
print(x, ...)
## summary function
## S3 method for class 'LD'
summary(object, ...)
## anova function
## S3 method for class 'LD'
anova(object, ...)

## print function for confidence intervals
## S3 method for class 'LDconfint'
print(x, ...)

## get dose values from model
get_x(object, ...)

Arguments

object, x

object fitted via LD.

group

(optional) specify a factor level of groups to extract only LDxx values for one of the groups.

type

type of prediction. See predict.gam in package mgcv for details.

newdata

(optional) new data used for predictions.

...

additional arguments passed to callies.

Author(s)

Benjamin Hofner

See Also

LD

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## model survival fractions for UV radiation experiment
data("geoderm.uv")
mod.uv <- LD(value ~ time, groups = "strain", experiment = "replicate",
             dose_trafo = "sqrt", data = geoderm.uv,
             family = negbin(theta = c(0.5, 10)))

## extract model and LDs
mod.uv
## a richer representation of the model (with LDs)
summary(mod.uv)

## extract LDs only
LD(mod.uv)

## plot the results
plot(mod.uv)
## with better labels:
plot(mod.uv, xlab = "Time (min)", ylab = expression(c.f.u.ml^-1))

## Not run: ## automatically as this takes a while.
## Users can run this code at any time
ci.uv <- confint(mod.uv)
## extract confidence intervals (and LDs)
ci.uv

## graphic with survival fractions and confidence intervals:
plot(ci.uv, xlab = "Time (min)", upper_ylab = expression(c.f.u.ml^-1),
     mar = c(4, 9.3, 2, 2.5))
## add labels
mtext(rep(c("LD10", "LD50"), 3), side = 4,
      at = c(0.8, 1.2, 1.8, 2.2, 2.8, 3.2),
      cex = 0.75, las = 2)

## End(Not run)

lethal documentation built on May 2, 2019, 4:19 p.m.

Related to methods in lethal...