Transform confidence intervals from glm fits.

Description

Transform confidence intervals derived from glm fits back to original scale and give appropriate names.

Usage

1
2
## S3 method for class 'glht'
UnlogCI(x)

Arguments

x

an object of class "confint.glht"

Details

Applies exponential function on the estimates and confidence limits and creates useful names for the comparisons and parameters.

Value

An object of class "UnlogCI".

See Also

plotCI.UnlogCI for plotting the result

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# # # CI for odds ratios
# # # for models on the logit-link

data(Feeding)

# Larval mortality:

Feeding$Lmort <- Feeding$Total - Feeding$Pupating

fit1<-glm(cbind(Pupating,Lmort)~Variety,data=Feeding, family=quasibinomial)
anova(fit1, test="F")

library(multcomp)

comp<-glht(fit1, mcp(Variety="Tukey"))

CIraw<-CIGLM(comp,method="Raw")

CIraw

UnlogCI(CIraw)

plotCI(UnlogCI(CIraw), lines=c(0.25,0.5,2,4),
 lineslwd=c(1,2,2,1), linescol=c("red","black","black","red"))


# # # # # # #

# # #  CI for ratios of means
# # # for models on the log-link

data(Diptera)

# Larval mortality:

fit2<-glm(Ges~Treatment, data=Diptera, family=quasipoisson)
anova(fit2, test="F")

library(multcomp)

comp<-glht(fit2, mcp(Treatment="Tukey"))

CIadj<-CIGLM(comp,method="Adj")

CIadj

UnlogCI(CIadj)

plotCI(UnlogCI(CIadj), lines=c(0.5,1,2), lineslwd=c(2,1,1))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.