regTermTest              package:survey              R Documentation

_W_a_l_d _t_e_s_t _f_o_r _a _t_e_r_m _i_n _a _r_e_g_r_e_s_s_i_o_n _m_o_d_e_l

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

     Provides Wald test and working likelihood ratio (Rao-Scott) test
     of the hypothesis that all coefficients associated with a
     particular regression term are zero (or have some other specified
     values). Particularly useful as a substitute for 'anova' when not
     fitting by maximum likelihood.  The Wald tests use a chisquared or
     F distribution, the LRT uses a linear combination of chisquared
     distributions as in 'pchisqsum'.

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

     regTermTest(model, test.terms, null=NULL,df=Inf, method=c("Wald","LRT"))

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

   model: A model object with 'coef' and 'vcov' methods

test.terms: Character string or one-sided formula giving name of term
          or terms to test

    null: Null hypothesis values for parameters. Default is zeros

      df: Denominator degrees of freedom for an F test. If 'NULL' these
          are estimated from the model

  method: If '"Wald"', the Wald-type test; if '"LRT"' the Rao-Scott
          test based on the estimated log likelihood ratio

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

     An object of class 'regTermTest' or 'regTermTestLRT'.

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

     Rao, JNK, Scott, AJ (1984) "On Chi-squared Tests For Multiway
     Contingency Tables with Proportions Estimated From Survey Data"
     Annals of Statistics 12:46-60.

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

     'anova', 'vcov', 'contrasts','pchisqsum'

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

      data(esoph)
      model1 <- glm(cbind(ncases, ncontrols) ~ agegp + tobgp * 
          alcgp, data = esoph, family = binomial())
      anova(model1)

      regTermTest(model1,"tobgp")
      regTermTest(model1,"tobgp:alcgp")
      regTermTest(model1, ~alcgp+tobgp:alcgp)

      data(api)
      dclus2<-svydesign(id=~dnum+snum, weights=~pw, data=apiclus2)
      model2<-svyglm(I(sch.wide=="Yes")~ell+meals+mobility, design=dclus2, family=quasibinomial())
      regTermTest(model2, ~ell)
      regTermTest(model2, ~ell,df=NULL)
      regTermTest(model2, ~ell, method="LRT")
      regTermTest(model2, ~ell+meals, method="LRT")

