Description Usage Arguments Value Examples
Multiple Weighted Least Squares Regression (mwlsr). Used to fit gaussian glm against multiple responses simultaneously.
1 2 3 |
data |
Input response matrix with responses in columns |
design |
Design matrix. See model.matrix |
weights |
Weights matrix |
scale.weights |
If TRUE then weights are scaled (default behavior) |
data.err |
Additional per-response-value uncertainty that should be considered in the final sum of squared residual. Useful if your response values have some knowm measurement uncertainty that you'd like to have considered in the models. |
coef.method |
Method used to compute coefficients. This setting is passed to mols.coefs or wls.coefs |
coef.tol |
Tolerance setting for svd based coefficient calculation. Passed to mols.coefs or wls.coefs |
coefs.only |
Stop at the coefficient calculation and return only the coefficients of the models. |
List with the following elements:
coefficients |
Model coefficients |
residuals |
Residuals of the fit |
fitted.values |
Fitted values. Same dimension as the input response matrix. |
deviance |
Sum of squared residuals |
dispersion |
deviance / df.residual |
null.deviance |
Sum of squared residuals for the NULL model (intercept only) |
weights |
Weights matrix |
prior.weights |
Weights matrix pre-scaling |
weighted |
TRUE if fit was a weighted fit |
df.residual |
Degrees of freedom of the model. |
df.null |
Degrees of freedom of the null model. |
y |
Input data matrix |
y.err |
Input |
X |
Design matrix |
x |
If design matrix was based on factor levels then this will be a factor vector that matches the original grouping vector |
intercept |
TRUE if the fit has an Intercept |
coef.hat |
If the fit has an Intercept then this is a matrix of modified coefficients that represent the per-group averages. This is calculated by adding the Intercept coefficients to each of the other coefficients. This only makes sense if your design was based on a single multi-level factor |
1 2 3 4 5 6 | # Using the iris data.
design <- model.matrix(~Species, data=iris)
fit <- mwlsr(iris[, 1:4], design)
# test data association with the Species factor
result <- mwlsr.Ftest(fit)
print(table(result$F.padj < 0.05))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.