Stat_smooth formula display and p
Accept YouTube Content. In addition, you may read the related articles on this website. I have published numerous other articles already. In this tutorial you have learned how to extract the fitted values shown in a regression line in R programming. In case you have further questions, tell me about it in the comments section.
Smoothed conditional means
Your email address will not be published. Post Comment. On this website, I provide statistics tutorials as well as code in Python and R programming. You must supply mapping if there is no plot mapping. If NULL , the default, the data is inherited from the plot data as specified in the call to ggplot.
Extract stat_smooth Regression Line Fit from ggplot2 Plot in R (Example)
A data. All objects will be fortified to produce a data frame. See fortify for which variables will be created. A function will be called with a single argument, the plot data. The return value must be a data. A function can be created from a formula e. Position adjustment, either as a string naming the adjustment e. Use the latter if you need to change the settings of the adjustment.
Description
Other arguments passed on to layer. Smoothing method function to use, accepts either NULL or a character vector, e. MASS::rlm or mgcv::gam , stats::lm , or stats::loess. It is equivalent to NULL. Formula to use in smoothing function, eg. Display confidence interval around smooth? TRUE by default, see level to control.
stat_smooth function - RDocumentation
If TRUE , missing values are silently removed. The orientation of the layer. The default NA automatically determines the orientation from the aesthetic mapping. In the rare event that this fails it can be given explicitly by setting orientation to either "x" or "y". See the Orientation section for more detail. Should this layer be included in the legends? NA , the default, includes if any aesthetics are mapped. It can also be a named logical vector to finely select the aesthetics to display. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.