Regression: 'Regression'

Description Usage Arguments Details References

View source: R/regression.R

Description

Generalized Regression.

Usage

1
2
3
4
5
6
7
8
9
Regression(formula, data = NULL, subset = NULL, weights = NULL,
  missing = "Exclude cases with missing data", type = "Linear",
  robust.se = FALSE, method = "default", output = "Coefficients",
  detail = FALSE, m = 10, seed = 12321, statistical.assumptions,
  auxiliary.data = 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,
  recursive.call = FALSE, ...)

Arguments

formula

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

data

A data.frame.

subset

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

weights

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

missing

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

type

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

robust.se

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

method

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

output

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

detail

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

m

The number of imputed samples, if using multiple imputation.

seed

The random number seed used in imputation.

statistical.assumptions

A Statistical Assumptions object.

auxiliary.data

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

show.labels

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

internal

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

contrasts

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.

relative.importance

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

importance.absolute

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

interaction

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

correction

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

interaction.formula

Used internally for multiple imputation.

recursive.call

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.

Details

"Imputation (replace missing values with estimates)". All selected outcome and predictor variables are included in the imputation, along with all auxiliary.data, 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.

References

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 July 7, 2018, 11:04 p.m.