lm_stats: Returns statistics for linear regressions (e.g. slope,...

Description Usage Arguments Details Value Examples

Description

Given data frame d, returns a data frame of the various regression statistics

Usage

1
  lm_stats(d, xvar, yvar)

Arguments

d

Data frame containing at least two numeric columns

xvar

Numeric column to be used as the independant variable for the regression

yvar

Numeric column to be used as the dependant variable for the regression

Details

include some details here

Value

Returns a one-row data frame containing (at present): slope, intercept, slope standard error, intercept standard error, p value, r-squared, and number of points.

Examples

1
2
require(ggplot2)
lm_stats(mpg, xvar="cty", yvar="hwy")

adsteen/Lloyd.et.al.Cell.abundance.metaanalysis documentation built on May 10, 2019, 7:26 a.m.