UnlogCI                package:BSagri                R Documentation

_T_r_a_n_s_f_o_r_m _c_o_n_f_i_d_e_n_c_e _i_n_t_e_r_v_a_l_s _f_r_o_m _g_l_m _f_i_t_s _a_n_d _g_e_e_g_l_m _f_i_t_s.

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     ## S3 method for class 'glht':
     UnlogCI(x)

_A_r_g_u_m_e_n_t_s:

       x: an object of class '"confint.glht"' 

_D_e_t_a_i_l_s:

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

_V_a_l_u_e:

     An object of class '"UnlogCI"'.

_S_e_e _A_l_s_o:

     'plotCI.UnlogCI' for plotting the result

_E_x_a_m_p_l_e_s:

     # # # 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))

