![]() ![]() Then plot the residuals against the explanatory variable using ggplot(). First, fit the linear regression model using lm() and save the residuals in the data frame. Our Figure 17.5-4 can be reproduced using the following commands. capColorRegression <- lm(offspringColorScore ~ midparentColorScore, data = capColor) Head(capColor) # midparentColorScore offspringColorScoreĪ quick residual plot can be obtained by plotting an lm() object with the ``plot()``` functon. capColor <- read.csv(url(""), stringsAsFactors = FALSE) The plot on the left is from a data set of blue tit cap color of offspring and parents. # Residual standard error: 1.669 on 30 degrees of freedom Save the results into a model object, and then use other commands to extract the quantities wanted. Default value is NULLĪ logical value.Fit the linear regression to the data using least squares. Whether or not use value labels in case of labelled dataĪ character string of column name be included in tooltip. Whether or not use column label in case of labelled data Integer indicating the number of decimal places Maximum unique number of a numeric vector treated as a factor If true use geom_count instead of geom_point_interactiveĪn integer. Level of confidence interval to use (0.95 by default) Should the fit span the full range of the plot, or just the data "lm", "glm", "gam", "loess", "rlm"įormula to use in smoothing function, eg. ![]() display confidence interval around linear regression? (TRUE by default) Set of aesthetic mappings created by aes or aes_. GgPoints ( data, mapping, smooth = TRUE, se = TRUE, method = "auto", formula = y ~ x, fullrange = FALSE, level = 0.95, use.count = FALSE, maxfactorno = 6, digits = 2, title = NULL, subtitle = NULL, caption = NULL, use.label = TRUE, use.labels = TRUE, tooltip = NULL, interactive = FALSE. ![]() unselectNumeric: Unselect numeric column of a ame.theme_clean: Clean theme for PieDonut plot.summarySE: Summarize a continuous variable by groups with mean, sd and. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |