Description Usage Arguments Value
View source: R/crossplot_stats.R
This function will plot either an unweighted or weighted regression line and print summary statistics. Log regressions are also permitted
1 2 3 |
p |
a crossplot |
log.reg |
logical variable that indicates if the regression
should be run in logs. Defaults to |
weighted |
logical variable that indicates if the the
regression will be weighted by the |
sprintf.format |
the string format for the stats in
|
xlabel |
a string with the name for the x-variable. Defaults
to |
ylabel |
a string with the name for the y-variable. Defaults
to |
reg.label.se |
logical. If set to |
mean.label.se |
logical. If set to |
a list of two data.frames with the crossplot
stats. The first element of the list, plot.stats holds a
data.frame of the stats in numeric format. The second
element of the list plot.stats.pretty holds a
data.frame of the stats in a pretty stringr format using
sprintf. The data.frame will include the
following variables: "slope", "slope.se",
"intercept", "intercept.se", "r.squared",
"adj.r.squared", "mean.x", "mean.y"
"var.x", "var.y", "sd.x",
"sd.y". The standard errors for the slope and the
intercept will be printed in parentheses next to the
coefficient in the labels. For the labels of the means,
variances, or standard deviations, xlabel and
ylabel will be used for the labels. Standard errors
will be heteroskedasticity-robust white standard errors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.