The R Project SVN R

Rev

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

Rev 68038 Rev 68082
Line 115... Line 115...
115
termplot(model, rug = TRUE)
115
termplot(model, rug = TRUE)
116
termplot(model, partial.resid = TRUE, se = TRUE, main = TRUE)
116
termplot(model, partial.resid = TRUE, se = TRUE, main = TRUE)
117
termplot(model, partial.resid = TRUE, smooth = panel.smooth, span.smth = 1/4)
117
termplot(model, partial.resid = TRUE, smooth = panel.smooth, span.smth = 1/4)
118
if(!had.splines && rs) detach("package:splines")
118
if(!had.splines && rs) detach("package:splines")
119
 
119
 
120
if (suppressWarnings(require(MASS, quietly = TRUE))) {
120
\donttest{## requires recommended package MASS
121
    hills.lm <- lm(log(time) ~ log(climb)+log(dist), data=hills)
121
hills.lm <- lm(log(time) ~ log(climb)+log(dist), data = MASS::hills)
122
    termplot(hills.lm, partial.resid = TRUE, smooth = panel.smooth,
122
termplot(hills.lm, partial.resid = TRUE, smooth = panel.smooth,
123
             terms = "log(dist)", main = "Original")
123
        terms = "log(dist)", main = "Original")
124
    termplot(hills.lm, transform.x = TRUE, partial.resid = TRUE,
124
termplot(hills.lm, transform.x = TRUE,
125
	     terms = "log(dist)", main = "Transformed",
125
         partial.resid = TRUE, smooth = panel.smooth,
126
	     smooth=panel.smooth)
126
	 terms = "log(dist)", main = "Transformed")
127
}
127
 
128
}
128
}}
129
\keyword{hplot}
129
\keyword{hplot}
130
\keyword{regression}
130
\keyword{regression}