nonresponse              package:survey              R Documentation

_E_x_p_e_r_i_m_e_n_t_a_l: _C_o_n_s_t_r_u_c_t _n_o_n-_r_e_s_p_o_n_s_e _w_e_i_g_h_t_s

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

     Functions to simplify the construction of non-reponse weights by
     combining strata with small numbers or large weights.

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

     nonresponse(sample.weights, sample.counts, population)
     sparseCells(object, count=0,totalweight=Inf, nrweight=1.5)
     neighbours(index,object)
     joinCells(object,a,...)
     ## S3 method for class 'nonresponse':
     weights(object,...)

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

sample.weights: table of sampling weight by stratifying variables

sample.counts: table of sample counts by stratifying variables

population: table of population size by stratifying variables

  object: object of class '"nonresponse"'

   count: Cells with fewer sampled units than this are "sparse"

nrweight: Cells with higher non-response weight than this are "sparse"

totalweight: Cells with average sampling weight times non-response
          weight higher than this are "sparse"

   index: Number of a cell whose neighbours are to be found

   a,...: Cells to join

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

     When a stratified survey is conducted with imperfect response it
     is desirable to rescale the sampling weights to reflect the
     nonresponse. If some strata have small sample size, high
     non-response, or already had high sampling weights it may be
     desirable to get less variable non-response weights by averaging
     non-response across strata. Suitable strata to collapse may be
     similar on the stratifying variables and/or on the level of
     non-response.

     'nonresponse()' combines stratified tables of population size,
     sample size, and sample weight into an object. 'sparseCells'
     identifies cells that may need combining. 'neighbours' describes
     the cells adjacent to a specified cell, and 'joinCells' collapses
     the specified cells.  When the collapsing is complete, use
     'weights()' to extract the nonresponse weights.

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

     'nonresponse' and 'joinCells' return objects of class
     '"nonresponse"', 'neighbours' and 'sparseCells' return objects of
     class '"nonresponseSubset"'

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

     data(api)
     ## pretend the sampling was stratified on three variables
     poptable<-xtabs(~sch.wide+comp.imp+stype,data=apipop)
     sample.count<-xtabs(~sch.wide+comp.imp+stype,data=apiclus1)
     sample.weight<-xtabs(pw~sch.wide+comp.imp+stype, data=apiclus1)

     ## create a nonresponse object
     nr<-nonresponse(sample.weight,sample.count, poptable)

     ## sparse cells
     sparseCells(nr)

     ## Look at neighbours
     neighbours(3,nr)
     neighbours(11,nr)

     ## Collapse some contiguous cells
     nr1<-joinCells(nr,3,5,7)

     ## sparse cells now
     sparseCells(nr1)
     nr2<-joinCells(nr1,3,11,8)

     nr2

     ## one relatively sparse cell
     sparseCells(nr2)
     ## but nothing suitable to join it to
     neighbours(3,nr2)

     ## extract the weights
     weights(nr2)

