Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

linearModel

Rcmdr Linear Model Dialog


Description

This dialog is used to specify a linear model to be fit by the lm function.

Details

The left model-formula box specifies the response variable to be used in the model; it may be a variable name or an expression evaluating to the response variable, such as log(income).

The right model-formula box specifies the right-hand (i.e., predictor) side of the model. See lm for details.

You can type directly in the model formula boxes. Alternatively, double-clicking the left mouse button on a variable in the variable-list transfers it to the left-hand side of the model (if it is empty or selected) or to the right-hand side. You can also enter operators and parentheses using the buttons above the formula. If you select several variables in the variable-list box, clicking on the +, *, or : button will enter them into the model formula.

Specifying a subset expression allows you to fit the model to a subset of observations in the active data set. For example, assuming that gender is a variable in the active data set, entering gender == "Male" would restrict the model to males.

The weights box allows you to perform weight-least-squares (WLS) regression; select a weight variable from the drop-down list. Click in the weights combo box to see a list of numeric variables in the current data set; type a letter in the box to move the selection cursor to the next variable beginning with that letter.

If the active model is a linear model and the active data set has not changed, then the initial values of the left-hand-side, right-hand-side, weights, and subset fields are retained from the previous model.

Author(s)

See Also


Rcmdr

R Commander

v2.7-1
GPL (>= 2)
Authors
John Fox [aut, cre], Milan Bouchet-Valat [aut], Liviu Andronic [ctb], Michael Ash [ctb], Theophilius Boye [ctb], Stefano Calza [ctb], Andy Chang [ctb], Vilmantas Gegzna [ctb], Philippe Grosjean [ctb], Richard Heiberger [ctb], Kosar Karimi Pour [ctb], G. Jay Kerns [ctb], Renaud Lancelot [ctb], Matthieu Lesnoff [ctb], Uwe Ligges [ctb], Samir Messad [ctb], Martin Maechler [ctb], Robert Muenchen [ctb], Duncan Murdoch [ctb], Erich Neuwirth [ctb], Dan Putler [ctb], Brian Ripley [ctb], Miroslav Ristic [ctb], Peter Wolf [ctb], Kevin Wright [ctb]
Initial release
2020-10-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.