The R Project SVN R

Rev

Rev 25034 | Rev 34154 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25034 Rev 25045
Line 17... Line 17...
17
## were different, the last one failed in 1.6.2 (at least)
17
## were different, the last one failed in 1.6.2 (at least)
18
 
18
 
19
 
19
 
20
## lm.influence where hat[1] == 1
20
## lm.influence where hat[1] == 1
21
if(require(MASS)) {
21
if(require(MASS)) {
22
fit <- lm(formula = 1000/MPG.city ~ Weight + Cylinders + Type + EngineSize + DriveTrain, data = Cars93)
22
    fit <- lm(formula = 1000/MPG.city ~ Weight + Cylinders + Type + EngineSize + DriveTrain, data = Cars93)
23
lm.influence(fit)
23
    print(lm.influence(fit))
-
 
24
    ## row 57 should have hat = 1 and resid=0.
-
 
25
    summary(influence.measures(fit))
24
}
26
}
25
## row 57 should have hat = 1 and resid=0.
27
## only last two cols in row 57 should be influential