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, White's first and second moment specification test |
Resid |
if |
Weights |
weights for each observation or residual square. This is usually the inverse of each variance. |
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 ANOVA table.
The second part is measures about 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 |
lower confidence limit with conf.level |
Df |
degree of freedom |
t value |
value for t distribution |
Pr(>|t|) |
probability of larger than absolute t value from t distribution with residual's degree of freedom |
The above result is repeated using HC0 and HC3, with following White's first and second moment specification test, if HC option is specified. The t values and their p values with HC1 and HC2 are between those of HC0 and H3.
Fitted |
Fitted value or y hat. This is returned only with Resid=TRUE option. |
Residual |
Weighted residuals. This is returned only with Resid=TRUE option. |
If summarize=FALSE
, REG
returns;
coeffcients |
beta coefficients |
g2 |
g2 inverse |
rank |
rank of the model matrix |
DFr |
degree of freedom for the residual |
SSE |
sum of square error |
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.