View source: R/LinRegProblem.R
LinRegProblem | R Documentation |
LinRegProblem
ObjectCreate a New LinRegProblem
Object
LinRegProblem( X, Y, add_intercept = TRUE, X_transform = identity, Y_transform = identity )
X |
An n \times m design matrix, optionally with an intercept column present. |
Y |
An n-length vector or n \times 1 matrix representing the response. |
add_intercept |
Logical. Should an intercept column (a column of 1s) be added to |
X_transform |
One-argument transformation function to apply to |
Y_transform |
One-argument transformation function to apply to |
This function constructs a new LinRegProblem
object from its arguments. Instances of the class contain the design matrix, response vector, fitted values, and estimated coefficients for a linear model. They also contain many relevant model statistics, such as DFFITS or the covariance matrix of the coefficients.
Members of the class are environments and therefore have reference semantics. Their main use is to illustrate the process of linear modeling and gather useful data about given models. By passing a LinRegProblem
object as the envir
argument to sub_call
, you can evaluate arbitrary expressions in the context of the object, making it easy to do textbook problems.
LinRegProblem
object
LinRegProblem(mtcars[, -1], mtcars[, 1], Y_transform = scale)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.