# How to check the linearity assumption in survey package?

I use svyglm to conduct the logistic regression of a complex survey. I am wondering if this function includes the check of linearity assumption. Is the check of linearity assumption necessary for logistic regression?

regTermTest does this.

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).

“Linearity” in this context means that coefficients of the regression are not of quadratic or higher order. \beta_0 +\beta_1x rather than \beta_0 +\beta_1x^2.

Thanks for your advice! I checked this function, but I am wondering how it works to check the linearity assumption as mentioned. It seems to be designed for model comparison and feature selection.

Linearity is assessed on a model. Were you expecting it to be assessed on data?

Yes. I found that one of the logistic regression assumptions is " The explanatory variables and the Logit of response variable have a linear relationship between them." I am wondering how to check this in survey package. I didn't find relevant information, so I don't know if this step is necessary.

regTermTest does this.

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).

“Linearity” in this context means that coefficients of the regression are not of quadratic or higher order. β0+β1x rather than β0+β1x2 .

Can it access the data?

The regTermTest accesses the model, which in turn accesses the data. Linearity is a relationship among coefficients of a model of data, not of data points themselves.