lack_of_fit | R Documentation |
Conduct the F Test for Lack of Fit
lack_of_fit( X, Y, Y_hat, resid = sum_square(Y, Y_hat), n = NROW(Y), p = NCOL(X), alpha = 0.05 )
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. |
Y_hat |
Vector of fitted values |
resid |
Vector of residuals |
n |
Number of rows in the design matrix. Computed if not provided. |
p |
Number of columns in the design matrix. Computed if not provided. |
alpha |
Alpha level for the significance test. |
This function carries out the F test for lack of fit, which essentially compares the model estimates to the local means of the response at each distinct observation. The test requires duplicate observations.
Computed F statistic for the test.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.