ci.reg {ALSM}R Documentation

Estimation and confidence interval of Mean Response and Prediction of New Observation in regression model

Description

Estimation of Mean Response and Prediction of New Observation:

Interval Estimation of EY_h

Confidence Region for Regression Surface. WorkingHotelling confidence band

Simultaneous Confidence Intervals for Several Mean Responses ( Working-Hotelling, Bonferroni confidence limit )

Prediction of New Observation Yh(new)

Prediction of Mean of m New Observations at Xh

Predictions of g New Observations. Simultaneous Scheffe prediction limits for g new observations at g different levels X_h

Usage

ci.reg(model, newdata, type = c("b", "s","w","n","m","nm","gn"), alpha = 0.05,m=1)

Arguments

model

model of regression

newdata

Data frame, New data on which the point estimate and confidencr interval is calculated.

type

Type of confidence interval

alpha

Confidence interval calculate with 1-α percent

m

When use "type=nm", m is equal, new observations are to be selected at the same levels x_h

Details

Type values:

b Simultaneous Confidence Intervals for Several Mean Responses by Bonferroni simultaneous confidence intervals.

s Simultaneous Scheffe prediction limits for g new observations at g different levels x_h

w Confidence Region for Regression Surface or Simultaneous Confidence Intervals for Several Mean Responses

n Prediction of New Observation.

m Mean response of New Observation.

nm When In new observations are to be selected at the same levels X_h and their mean Yh(new) is to be predicted

gn Simultaneous Bonferroni prediction limits for g new observations at g different levels X_h

NOTE: for the rest of the type states, m = 1.

Value

calculate estimation and cofidence interval

Note

by default, type is 'b'

References

Michael H. Kutner; Christopher J. Nachtsheim; John Neter; William Li. Applied Linear Statistical Models Fifth Edition

Examples


#### problem 6.14.a page 250
d<-data.frame(282000,7.1,0)
ci.reg(lm(y~x1+x2+x3,GroceryRetailer),d,type='nm',m=3)

#### problem 6.13.b page 250
d<-data.frame(c(230000,250000,280000,340000),c(7.5,7.3,7.1,6.9),c(0,0,0,0))
ci.reg(lm(y~x1+x2+x3,GroceryRetailer),d,type='gn')

#### problem 6.12.a page 250
d<-data.frame(c(302000,245000,280000,350000,295000),c(7.2,7.4,6.9,7,6.7),c(0,0,0,0,1))
ci.reg(lm(y~x1+x2+x3,GroceryRetailer),d,type='b')

### example page 158
d<-data.frame(c(30,65,100))
ci.reg(lm(y~x,TolucaCompany),d,type='w',alpha=.1)

### example page 54
d<-data.frame(65)
ci.reg(lm(y~x,TolucaCompany),d,type='m',alpha=.1)

### example page 59
d<-data.frame(100)
ci.reg(lm(y~x,TolucaCompany),d,type='n',alpha=.1)





[Package ALSM version 0.2.0 Index]