Regression: 'Regression'

Description Usage Arguments Details References

View source: R/regression.R


Generalized Regression.


Regression(formula, data = NULL, subset = NULL, weights = NULL,
  missing = "Exclude cases with missing data", type = "Linear", = FALSE, method = "default", output = "Coefficients",
  detail = FALSE, m = 10, seed = 12321, statistical.assumptions, = NULL, show.labels = FALSE, internal = FALSE,
  contrasts = c("contr.treatment", "contr.treatment"),
  relative.importance = FALSE, importance.absolute = FALSE,
  interaction = NULL, correction = "None", interaction.formula = NULL, = FALSE, ...)



An object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of type specification are given under ‘Details’.


A data.frame.


An optional vector specifying a subset of observations to be used in the fitting process, or, the name of a variable in data. It may not be an expression. subset may not


An optional vector of sampling weights, or, the name or, the name of a variable in data. It may not be an expression.


How missing data is to be treated in the regression. Options: "Error if missing data", "Exclude cases with missing data", "Use partial data (pairwise correlations)", "Imputation (replace missing values with estimates)", and "Multiple imputation".


Defaults to "linear". Other types are: "Poisson", "Quasi-Poisson", "Binary Logit", "NBD", "Ordered Logit", and "Multinomial Logit"

If TRUE, computes standard errors that are robust to violations of the assumption of constant variance for linear models, using the HC3 modification of White's (1980) estimator (Long and Ervin, 2000). This parameter is ignored if weights are applied (as weights already employ a sandwich estimator). Other options are FALSE and "FALSE"No, which do the same thing, and "hc0", "hc1", "hc2", "hc4".


The method to be used; for fitting. This will only do something if method = "model.frame", which returns the model frame.


"Coefficients" returns a table of coefficients and various summary and model statistics. It is the default. "ANOVA" returns an ANOVA table. "R" returns a more traditional R output. "Relative Importance Analysis" returns a table with Relative Importance scores.


This is a deprecated function. If TRUE, output is set to R.


The number of imputed samples, if using multiple imputation.


The random number seed used in imputation.


A Statistical Assumptions object.

A data.frame containing additional variables to be used in imputation (if required). While adding more variables will improve the quality of the imputation, it will dramatically slow down the time to estimate. Factors and Character variables with a large number of categories should not be included, as they will both slow down the data and are unlikely to be useful


Shows the variable labels, as opposed to the names, in the outputs, where a variables label is an attribute (e.g., attr(foo, "label")).


If TRUE, skips most of the tidying at the end. Only for use when it is desired to call a relatively light version of Regression for other purposes (e.g., in ANOVA). This leads to creation of an object of class FitRegression.)


A vector of the contrasts to be used for factor and ordered variables. Defaults to c("contr.treatment", "contr.treatment")). Set to c("contr.treatment", "contr.poly")) to use orthogonal polynomials for factor See contrasts for more information.


Deprecated. To run Relative Importance Analysis, use the output variable.


Whether the absolute value of the relative importance should be shown.


Optional variable to test for interaction with other variables in the model. Output will be a crosstab showing coefficients from both both models.


Method to correct for multiple comparisons. Can be one of "None", "False Discovery Rate", "Benjamini & Yekutieli", "Bonferroni", "Hochberg", "Holm" or "Hommel".


Used internally for multiple imputation.

Used internally to indicate if call is a result of recursion (e.g., multiple imputation).


Additional argments to be past to lm or, if the data is weighted, svyglm.


"Imputation (replace missing values with estimates)". All selected outcome and predictor variables are included in the imputation, along with all, excluding cases that are excluded via subset or have invalid weights, but including cases with missing values of the outcome variable. Then, cases with missing values in the outcome variable are excluded from the analysis (von Hippel 2007). See Imputation.


von Hippel, Paul T. 2007. "Regression With Missing Y's: An Improved Strategy for Analyzing Multiply Imputed Data." Sociological Methodology 37:83-117. White, H. (1980), A heteroskedastic-consistent covariance matrix estimator and a direct test of heteroskedasticity. Econometrica, 48, 817-838. Long, J. S. and Ervin, L. H. (2000). Using heteroscedasticity consistent standard errors in the linear regression model. The American Statistician, 54(3): 217-224.

NumbersInternational/flipRegression documentation built on April 12, 2018, 2:50 a.m.