ci                  package:gmodels                  R Documentation

_C_o_m_p_u_t_e _C_o_n_f_i_d_e_n_c_e _I_n_t_e_r_v_a_l_s

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

     Compute and display confidence intervals for model estimates. 
     Methods are provided for the mean of a numeric vector
     'ci.default', the probability of a binomial vector 'ci.binom', and
     for 'lm', 'lme', and 'lmer' objects are provided.

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

       x: object from which to compute confidence intervals. 

confidence: confidence level. Defaults to 0.95. 

   alpha: type one error rate.  Defaults to 1.0-'confidence' 

   na.rm: boolean indicating whether missing values should be removed.
          Defaults to 'FALSE'.

     ...: Arguments for methods

sim.lmer: Logical value. If TRUE confidence intervals will be estimated
          using '\Link[Matrix]{mcmcsamp}'. This option only takes
          effect for lmer objects.

   n.sim: Number of samples to take in '\Link[Matrix]{mcmcsamp}'.

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

     vector or matrix with one row per model parameter and
     elements/columns 'Estimate', 'CI lower', 'CI upper', 'Std. Error',
     'DF' (for lme objects only), and 'p-value'.

_A_u_t_h_o_r(_s):

     Gregory R. Warnes Gregory_R_Warnes\@groton.pfizer.com

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

     'confint', 'lm', 'summary.lm'

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

     # mean and confidence interval 
     ci( rnorm(10) )

     # binomial proportion and exact confidence interval
     b <- rbinom( prob=0.75, size=1, n=20 )
     ci.binom(b) # direct call
     class(b) <- 'binom'
     ci(b)       # indirect call

     # confidence intervals for regression parameteres
     data(state)
     reg  <-  lm(Area ~ Population, data=as.data.frame(state.x77))
     ci(reg) 

