The R Project SVN R

Rev

Rev 68948 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68948 Rev 80080
Line 37... Line 37...
37
x <- 1:20
37
x <- 1:20
38
y <-  setNames(x + (x/4 - 2)^3 + rnorm(20, sd = 3),
38
y <-  setNames(x + (x/4 - 2)^3 + rnorm(20, sd = 3),
39
               paste("O", x, sep = "."))
39
               paste("O", x, sep = "."))
40
ww <- rep(1, 20); ww[13] <- 0
40
ww <- rep(1, 20); ww[13] <- 0
41
summary(lmxy <- lm(y ~ x + I(x^2)+I(x^3) + I((x-10)^2), weights = ww),
41
summary(lmxy <- lm(y ~ x + I(x^2)+I(x^3) + I((x-10)^2), weights = ww),
42
        cor = TRUE)
42
        correlation = TRUE)
43
variable.names(lmxy)
43
variable.names(lmxy)
44
variable.names(lmxy, full = TRUE)  # includes the last
44
variable.names(lmxy, full = TRUE)  # includes the last
45
case.names(lmxy)
45
case.names(lmxy)
46
case.names(lmxy, full = TRUE)      # includes the 0-weight case
46
case.names(lmxy, full = TRUE)      # includes the 0-weight case
47
}
47
}