fitted.lod_lm {lodr} | R Documentation |
Extract lod_lm residuals
Description
Extracts fitted values from object of class "lod_lm
".
Usage
## S3 method for class 'lod_lm'
fitted(object, ...)
Arguments
object |
An object of class " |
... |
further arguments passed to or from other methods. |
Details
For subjects with covariates outside of limits of detection, when computing fitted values the values for these covariates are set according to method specified by argument fill_in_method
in call to lod_lm
.
Value
Fitted values extracted from object
as a named numeric vector.
Author(s)
Kevin Donovan, kmdono02@ad.unc.edu.
Maintainer: Kevin Donovan <kmdono02@ad.unc.edu>
References
May RC, Ibrahim JG, Chu H (2011). “Maximum likelihood estimation in generalized linear models with multiple covariates subject to detection limits.” Statistics in medicine, 30(20), 2551–2561.
See Also
coef.lod_lm
and residuals.lod_lm
for related methods; lod_lm
for model fitting.
The generic functions coef
and residuals
.
Examples
library(lodr)
## Using example dataset provided in lodr package: lod_data_ex
## 3 covariates: x1, x2, x3 with x2 and x3 subject to a lower limit of
## detection of 0
## nSamples set to 100 for computational speed/illustration purposes only.
## At least 250 is recommended. Same for boots=0; results in NAs returned for standard errors
fit <- lod_lm(data=lod_data_ex, frmla=y~x1+x2+x3, lod=c(0,0),
var_LOD=c("x2", "x3"), nSamples=100, boots=0)
fitted(fit)