#| label = "Plot{{DataName}}",
#| fig.cap = ""
{{DataName}} |> ggplot(aes(y={{ResponseName}}, x={{PredictorName}})) + geom_point() + geom_smooth()
#| label = "{{DataName}}.poly"
{{DataName}}.poly1  <- lm({{ResponseName}} ~ {{PredictorName}}, data = DataName)
{{DataName}}.poly2 <- lm({{ResponseName}} ~ poly({{PredictorName}}, 2, raw=TRUE), data = DataName)
{{DataName}}.poly3 <- lm({{ResponseName}} ~ poly({{PredictorName}}, 3, raw=TRUE), data = DataName)
{{DataName}}.poly4 <- lm({{ResponseName}} ~ poly({{PredictorName}}, 4, raw=TRUE), data = DataName)
anova({{DataName}}.poly1, {{DataName}}.poly2, {{DataName}}.poly3, {{DataName}}.poly4)
#| label = "plot{{DataName}}.lm",
#| fig.cap = "Residual analysis for {{DataName}}.poly"
library(ggfortify)
# should really change the following to the preferred model
{{DataName}}.poly4 |> autoplot()


Try the BrailleR package in your browser

Any scripts or data that you put into this service are public.

BrailleR documentation built on July 26, 2023, 5:46 p.m.