getDesign | R Documentation |
This function gets full and reduced design matrix for a linear model as well as the degrees of freedom for the comparison.
getDesign(form, formred, data, tol = 1e-07)
form |
A formula or string beginning with ~ that can be interpreted as an lm formula without the outcome variable. Alternatively, a design matrix. |
formred |
Similar to above. except this should be a simplified model relative to form. Put another way, the design matrix for this model should span a subset of the column space of the other model |
data |
A data frame containing the variables specified in form. |
tol |
Tolerance for determining the number of linearly independent columns to determine the df of the test. |
If robust=TRUE, then the number of parameters being tested has to be equal to the df of the test, if not, then the covariance matrix of the parameters will be noninvertible. If robust=TRUE, then the design is rotated to a df lower dimensional space. This problem happens when testing splines, where the linear component of the full model is parameterized differently than the reduced model.
Returns design matrices for the full and reduced model, the df for the comparison between the two, and a vector indicating rows with no missing data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.