measurement              package:memisc              R Documentation

_L_e_v_e_l_s _o_f _M_e_a_s_u_r_e_m_e_n_t _o_f _S_u_r_v_e_y _I_t_e_m_s

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

     The measurement level of a '"item"' object, which is one of
     "nominal", "ordinal", "interval", "ratio", determines what happens
     to it, if it or the 'data.set' containing it is coerced into a
     'data.frame'. If the level of measurement level is "nominal", the
     it will be converted into an (unordered) factor, if the level of
     measurement is "ordinal", the item will be converted into an
     ordered vector. If the measurement is "interval" or "ratio", the
     item will be converted into a numerical vector.

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

     ## S4 method for signature 'item':
     measurement(x)
     ## S4 replacement method for signature 'item':
     measurement(x) <- value
     is.nominal(x)
     is.ordinal(x)
     is.interval(x)
     is.ratio(x)

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

       x: an object, usually of class '"item"'.

   value: a character string; either "nominal", "ordinal", "interval",
          or "ratio". 

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

     'measurement(x)' returns a character string. 'is.nominal',
     'is.ordinal', 'is.interval', 'is.ratio' return a logical value.

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

     Stevens, Stanley S. 1946. "On the theory of scales of
     measurement." _Science_ 103: 677-680.

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

     'data.set', 'item'

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

     answer <- sample(c(1,2,3,8,9),size=30,replace=TRUE)
     labels(answer) <- c(Conservatives         =  1,
                         Labour                =  2,
                         "Liberal Democrats"   =  3,
                         "Don't know"          =  8,
                         "Answer refused"      =  9
                         )
     missing.values(answer) <- c(8,9)
     as.data.frame(answer)[[1]]
     measurement(answer) <- "interval"
     as.data.frame(answer)[[1]]

