dcnormal1                package:VGAM                R Documentation

_U_n_i_v_a_r_i_a_t_e _N_o_r_m_a_l _D_i_s_t_r_i_b_u_t_i_o_n _w_i_t_h _D_o_u_b_l_e _C_e_n_s_o_r_i_n_g

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

     Maximum likelihood estimation of the two parameters of a
     univariate normal distribution when there is double censoring.

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

     dcnormal1(r1 = 0, r2 = 0, link.sd = "loge", isd = NULL, zero = NULL)

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

  r1, r2: Integers. Number of smallest and largest values censored,
          respectively.

 link.sd: Parameter link function applied to the standard deviation.
          See 'Links' for more choices. Being a positive quantity, a
          log link is the default.

     isd: Numeric. Initial value for the standard deviation. The
          default value 'NULL' means an initial value is obtained
          internally from the data.

    zero: An integer with value 1 or 2. If so, the mean or standard
          deviation respectively are modelled as an intercept only. 
          Usually, setting 'zero=2' will be used, if used at all.  The
          default value 'NULL' means both linear/additive predictors
          are modelled as functions of the explanatory variables.

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

     This family function uses the Fisher information matrix given in
     Harter and Moore (1966).  The matrix is not diagonal if either
     'r1' or 'r2' are positive.

     By default, the mean is the first linear/additive predictor and
     the log of the standard deviation is the second linear/additive
     predictor.

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

     An object of class '"vglmff"' (see 'vglmff-class'). The object is
     used by modelling functions such as 'vglm', and 'vgam'.

_N_o_t_e:

     This family function only handles a vector or one-column matrix
     response. The 'weights' argument, if used, are interpreted as
     frequencies, therefore it must be a vector with positive integer
     values.

     With no censoring at all (the default), it is better (and
     equivalent) to use 'normal1'.

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

     T. W. Yee

_R_e_f_e_r_e_n_c_e_s:

     Harter, H. L. and Moore, A. H. (1966) Iterative maximum-likelihood
     estimation of the parameters of normal populations from singly and
     doubly censored samples.  _Biometrika_, *53*, 205-213.

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

     'normal1', 'tobit'.

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

     ## Not run: 
     # Repeat the simulations described in Harter and Moore (1966)
     SIMS = 100   # Number of simulations (change this to 1000)
     mu.save = sd.save = rep(NA, len=SIMS)
     r1 = 0; r2 = 4; n = 20  
     for(sim in 1:SIMS) {
         y = sort(rnorm(n))
         y = y[(1+r1):(n-r2)]  # Delete r1 smallest and r2 largest
         fit = vglm(y ~ 1, dcnormal1(r1=r1, r2=r2))
         mu.save[sim] = predict(fit)[1,1]
         sd.save[sim] = exp(predict(fit)[1,2])   # Assumes a log link and ~ 1
     }
     # Now look at the results
     c(mean(mu.save), mean(sd.save))  # Should be c(0,1)
     c(sd(mu.save), sd(sd.save))
     ## End(Not run)

     # Data from Sarhan and Greenberg (1962); MLEs are mu=9.2606, sd=1.3754
     strontium90 = c(8.2, 8.4, 9.1, 9.8, 9.9)
     fit = vglm(strontium90 ~ 1, dcnormal1(r1=2, r2=3, isd=6), trace=TRUE)
     coef(fit, matrix=TRUE)
     Coef(fit)

