ggAddR: Add a fit statistic to a ggplot

View source: R/misc_and_utility.R

ggAddRR Documentation

Add a fit statistic to a ggplot

Description

Add a fit statistic to a ggplot

Usage

ggAddR(model, effect = NA, xloc = 8, yloc = 10)

Arguments

model

a statistical model which contains a fit measure.

effect

optional hard coded fit/effect.

xloc

x location of R.

yloc

y location of R.

Value

  • plot

See Also

  • umxPlot(), umxPlotFun()

Other Plotting functions: plot.MxLISRELModel(), plot.MxModelTwinMaker(), plot.MxModel(), umxPlotACEcov(), umxPlotACEv(), umxPlotACE(), umxPlotCP(), umxPlotDoC(), umxPlotFun(), umxPlotGxEbiv(), umxPlotGxE(), umxPlotIP(), umxPlotSexLim(), umxPlotSimplex(), umxPlot(), umx

Examples

## Not run: 
m1 = lm(mpg ~ wt, data = mtcars)
p = ggplot2::ggplot(data = mtcars, aes(x = wt, y = mpg))+ geom_point() +geom_smooth()+
ggAddR(m1, effect = NA, xloc=2, yloc= 10); p

## End(Not run)

umx documentation built on Nov. 17, 2023, 1:07 a.m.

Related to ggAddR in umx...