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.MxModel(), plot.MxModelTwinMaker(), umx, umxPlot(), umxPlotACE(), umxPlotACEcov(), umxPlotACEv(), umxPlotCP(), umxPlotDoC(), umxPlotFun(), umxPlotGxE(), umxPlotGxEbiv(), umxPlotIP(), umxPlotSexLim(), umxPlotSimplex()

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)

tbates/umx documentation built on Dec. 14, 2024, 11:28 a.m.