simulatemissings        package:compositions        R Documentation

_A_r_t_i_f_i_c_a_l _s_i_m_u_l_a_t_i_o_n _o_f _v_a_r_i_o_u_s _k_i_n_d_s _o_f _m_i_s_s_i_n_g_s

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

     This is a simulation mechanism to check the missing technique. It
     just generates additional missings of the various types in a given
     dataset.

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

     simulateMissings(x,detectionlimit=NULL,
          knownlimit=FALSE,MARprob=0.0,MNARprob=0.0,
          mnarity=0.5,SZprob=0.0)

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

       x: a dataset that should get the missings

detectionlimit: the detection limit described in 'clo', to impose an
          artificial detection limit

knownlimit: a boolean indicating wether the actual detection limit is
          still known in the dataset.

 MARprob: the probability of occurence of 'Missings At Random' values

MNARprob: the probability of occurrence of 'Missings Not At Random'. 
          The tendency is that small values have a higher probability
          to be missed.

 mnarity: a number between 0 and 1 giving the strength of the influence
          of the actual value in becoming a MNAR. 0 means a MAR like
          behavior and 1 means that it is just the smallest values that
          is lost

  SZprob: the probability to obtain a structural zero. This is done at
          random like a MAR.

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

     Without any additional parameters no missings are generated.  The
     procedure to generate MNAR affects all variables.

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

     A dataset like 'x' but with some additional missings.

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

     K.Gerald van den Boogaart

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

     See compositions.missings for more details.

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

     compositions.missings

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

     data(SimulatedAmounts)
     x <- acomp(sa.lognormals)
     xnew <- simulateMissings(x,detectionlimit=0.05,MAR=0.05,MNAR=0.05,SZ=0.05)
     xnew
     plot(missingSummary(xnew))

