R functions (D)

The list of new R functions introduced in this Survey data analysis lab component are below:

Function_name Package_name Use
AIC base/stats To extract the AIC value of a model
as.character base To create a character vector
as.numeric base To create a numeric vector
eval base To evaluate an expression
fitted base/stats To extract fitted values of a model
ls base To see the list of objects
psrsq survey To compute the Nagelkerke and Cox-Snell pseudo R-squared statistics for survey data
regTermTest survey To test for an additional variable in a regression model
residuals base/stats To extract residuals of a model
stepAIC MASS To choose a model by stepwise AIC
step base/stats To choose a model by stepwise AIC but it can keep the pre-specified variables in the model
summ jtools To show/publish regression tables
svyboxplot survey To produce a box plot for survey data
svyby survey To see the summary statistics for a survey design
svychisq survey To test the bivariate assocaition between two categorical variables for survey data
svyCreateTableOne tableone To create a frequency table with a survey design
svydesign survey To create a design for the survey data analysis
svyglm survey To run design-adjusted generalized linear models
update base/stats To update and re-fit a regression model