Description Usage Arguments Examples
Draw a ggplot with an object of class gam
1 2 3 4 5 6 7 8 9 10 11 12 | predictModel(
model,
select = NULL,
point = TRUE,
se = TRUE,
by,
type = "response",
interactive = FALSE,
fillcolor = "red",
fillalpha = 0.4,
...
)
|
model |
An object of class gam |
select |
numeric Choices of dependent variables to plot |
point |
logical Whether or not draw point |
se |
logical Whether or not draw confidence interval |
by |
NULL or character optional name of factor variable |
type |
character type argument to be passed to predict.gam |
interactive |
logical If true, make a interactive plot |
fillcolor |
character The fill color of geom_ribbon |
fillalpha |
numeric The alpha value of geom_ribbon |
... |
further arguments to be passed to geom_point_interactive |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | model=lm(mpg~wt+hp+am,data=mtcars)
predictModel(model,interactive=TRUE)
predictModel(model,by=am)
predictModel(model,by=am,interactive=TRUE)
model=lm(Sepal.Length~Sepal.Width+Petal.Length+Species,data=iris)
summary(model)
predictModel(model)
predictModel(model,interactive=TRUE)
predictModel(model,by=Species)
data(colon,package="survival")
model=glm(status~rx+age+nodes,data=colon,family=binomial)
predictModel(model)
predictModel(model,by=rx)
predictModel(model,by=rx,type="link")
predictModel(model,type="link")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.