confint.lognlm {logNormReg} | R Documentation |
Confidence intervals for the parameters in log normal regression
Description
Computes confidence intervals (based on the Gradient, Wald or Likelihood Ratio sattistic) for the linear parameters in a fitted ‘lognreg’ model.
Usage
## S3 method for class 'lognlm'
confint(object, parm, level=0.95, type = c("wald", "gradient", "lrt"), ...)
Arguments
object |
a fitted |
parm |
the parameter of interest. Numeric (covariate number) or character (covariate name). If missing |
level |
the required confidence level (default to 0.95). |
type |
Which statistics should be used? Currently |
... |
When |
Details
Confidence intervals are computed and returned. Currently the Wald, Gradient or Likelihood ratio statistic can be used. Based on some simulation experiments the simple Wald based CIs appears adeguate to guarantee the nominal coverage levels.
Value
The end-points of confidence intervals.
Author(s)
Vito Muggeo
References
For a gentle and general introduction about the likelihood-based statistics (including the gradient) see
Muggeo V.M.R., Lovison G. (2014), The 'three plus one' likelihood-based test statistics: unified geometrical and graphical interpretations. The American Statistician, 68, 302-306.
See Also
Examples
n=50
s=.4
set.seed(1515) #just to get reproducible results..
#covariates
x<-seq(.1,10,l=n)
z<-rnorm(n)
#response
mu<- 10+.5*x- z #linear regression function
y<-rlnorm(n, log(mu)-s^2/2, s) #data..
o<- lognlm(y~x+z, lik=TRUE) #ML estimation
confint(o, "x", type="g")
confint(o, "z", type="w") #same than confint.default(o)