| REG | R Documentation |
REG is similar to SAS PROC REG.
REG(Formula, Data, conf.level=0.95, HC=FALSE, Resid=FALSE, Weights=1,
summarize=TRUE)
Formula |
a conventional formula for a linear model |
Data |
a |
conf.level |
confidence level for the confidence limit |
HC |
heteroscedasticity-related output is required, such as HC0, HC3, and White's first and second moment specification test |
Resid |
if |
Weights |
weights for each observation, usually the inverse of each variance. This should be a scalar or a vector of the same length as the number of rows of |
summarize |
If this is |
It performs the core function of SAS PROC REG.
The result is comparable to that of SAS PROC REG.
The first part is the ANOVA table.
The second part is measures of fitness.
The third part is the estimates of coefficients.
Estimate |
point estimate of parameters, coefficients |
Estimable |
estimability: 1=TRUE, 0=FALSE. This appears only when at least one inestimability occurs. |
Std. Error |
standard error of the point estimate |
Lower CL |
lower confidence limit with conf.level |
Upper CL |
upper confidence limit with conf.level |
Df |
degrees of freedom |
t value |
value for the t distribution |
Pr(>|t|) |
probability of a larger absolute t value from the t distribution with the residual's degrees of freedom |
The above result is repeated using HC0 and HC3, followed by White's first and second moment specification test, if the HC option is specified. The t values and their p values with HC1 and HC2 are between those of HC0 and HC3.
Fitted |
Fitted value or y hat in the original scale as SAS OUTPUT P= does, even with Weights. This is returned only with the Resid=TRUE option. |
Residual |
Residuals in the original scale as SAS OUTPUT R= does, even with Weights. This is returned only with the Resid=TRUE option. |
If summarize=FALSE, REG returns;
coefficients |
beta coefficients |
g2 |
g2 inverse |
rank |
rank of the model matrix |
DFr |
degrees of freedom for the residual |
SSE |
sum of squared errors |
Kyun-Seop Bae k@acr.kr
lr
REG(uptake ~ Plant + Type + Treatment + conc, CO2)
REG(uptake ~ conc, CO2, HC=TRUE)
REG(uptake ~ conc, CO2, Resid=TRUE)
REG(uptake ~ conc, CO2, HC=TRUE, Resid=TRUE)
REG(uptake ~ conc, CO2, summarize=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.