Regr {MVar} | R Documentation |
Performs linear regression on a data set.
Regr(Y, X, namevarx = NA, intercepts = TRUE, sigf = 0.05)
Y |
Variable response. |
X |
Regression variables. |
namevarx |
Name of the variable, or variables X, if not set, assumes the default text. |
intercepts |
Consider the intercept in the regression (default = TRUE). |
sigf |
Level of significance of residue tests(default = 5%). |
Betas |
Regression coefficients. |
CovBetas |
Covariance matrix of the regression coefficients. |
ICc |
Confidence interval of the regression coefficients. |
hip.test |
Hypothesis test of the regression coefficients. |
ANOVA |
Regression analysis of the variance. |
R |
Determination coefficient. |
Rc |
Corrected coefficient of determination. |
Ra |
Adjusted coefficient of determination. |
QME |
Variance of the residues. |
ICQME |
Confidence interval of the residue variance. |
prev |
Prediction of the regression fit. |
IPp |
Predictions interval |
ICp |
Interval of prediction confidence |
error |
Residuals of the regression fit. |
error.test |
It returns to 5% of significance the test of independence, normality and homogeneity of the variance of the residues. |
Paulo Cesar Ossani
CHARNET, R.; at al.. Analise de modelos de regressao lienar, 2a ed. Campinas: Editora da Unicamp, 2008. 357 p.
RENCHER, A. C.; SCHAALJE, G. B. Linear models in statisctic. 2th. ed. New Jersey: John & Sons, 2008. 672 p.
RENCHER, A. C. Methods of multivariate analysis. 2th. ed. New York: J.Wiley, 2002. 708 p.
data(DataMix) Y <- DataMix[,2] X <- DataMix[,6:7] NomeY <- "Medias notas" NomeX <- c("Special Coffees", "Commercial Coffees") Res <- Regr(Y, X, namevarx = NomeX , intercepts = TRUE, sigf = 0.05) print("Regression Coefficients:"); round(Res$Betas,4) print("Analysis of Variance:"); Res$ANOVA print("Hypothesis test of regression coefficients:"); round(Res$hip.test,4) print("Determination coefficient:"); round(Res$R,4) print("Corrected coefficient of determination:"); round(Res$Rc,4) print("Adjusted coefficient of determination:"); round(Res$Ra,4) print("Tests of the residues"); Res$error.test