I did linear regression model and use summary of the model to display estimates and p.values. I want a global pvalue for categorical variable with more than 2 two values. I know drop1() of the model could display a global p.value for such a variable but it is without estimates and standard error(it display instead AIC, and other parameters). I am searching a way to could dispaly a global p.value for such a categorical variable in the model and also have the estimates If is use this code
summary(mod)
Here is the output
Call: lm(formula = retplasma ~ age + vitamine + alcool + bmi + cholesterol + retdiet + sexe1 + tabac1, data = datasego)
Residuals: Min 1Q Median 3Q Max -460.96 -125.16 -31.74 107.88 995.35
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 543.390976 98.361237 5.524 7.94e-08 ***
age 2.689612 0.891518 3.017 0.0028 **
vitamine -11.883758 14.558773 -0.816 0.4151
alcool 7.022657 2.828017 2.483 0.0136 *
bmi 1.118128 2.031971 0.550 0.5826
cholesterol -0.187614 0.111741 -1.679 0.0943 .
retdiet -0.005009 0.022561 -0.222 0.8245
sexe1Femme -76.913471 41.042005 -1.874 0.0620 .
tabac1Non 45.757734 25.265455 1.811 0.0713 .
Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 198.4 on 263 degrees of freedom (43 observations deleted due to missingness) Multiple R-squared: 0.1253, Adjusted R-squared: 0.09872 F-statistic: 4.71 on 8 and 263 DF, p-value: 2.067e-05