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 lognlm object.

parm

the parameter of interest. Numeric (covariate number) or character (covariate name). If missing parm=2 is taken, i.e. the coefficient of the first covariate, provided the intercept is in the model.

level

the required confidence level (default to 0.95).

type

Which statistics should be used? Currently "wald", "gradient", or "lrt". Names can be abbreviated. If object has been obtained with lik=FALSE, only type="wald" or "gradient" is permitted.

...

When type is not "wald", other optional arguments to be passed on the internal functions:
- lim to specify the range of the evaluation points (default to (-3,3) resulting in the interval \hat\beta \pm 3\times \mathrm{SE}(\hat\beta));
- values to set explicitly the evaluation point(s);
- return.val to return (if TRUE) the evaluation points and the corresponding statistic values (useful to plot the profiled statistic). If the supplied values includes just one scalar, return.val is set to TRUE.

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

lognlm

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) 


[Package logNormReg version 0.5-0 Index]