lmGC: Linear Regression

Description Usage Arguments Value Author(s) Examples

View source: R/lmGC.R

Description

Regression analysis (one numerical predictor variable) with simplified output. Wrapper function for lm in package stats.

Usage

1

Arguments

form

formula of form y~x, both variables numeric

data

dataframe supplying y and x above. If one or more of the variables is not in data, then they will be searched for in the parent environment.

graph

Produce scatterplot with fitted polynomial, together with prediction standard error bands

check

Asks to produce a lowess or gam curve with approximate 95 fitted line wanders outside the band, then perhaps a linear fit is not appropriate.

Value

A list of class "GClm". Elements that may be queried include "slope", "intercept", "s" (residual standard error), "R^2" (unadjusted).

Author(s)

Homer White hwhite0@georgetowncollege.edu

Examples

1
2
#To study the relationship between two numerical variables:
lmGC(fastest~GPA,data=m111survey,graph=TRUE)

Example output

Loading required package: abd
Loading required package: nlme
Loading required package: lattice
Loading required package: grid
Loading required package: mosaic
Loading required package: dplyr

Attaching package: 'dplyr'

The following object is masked from 'package:nlme':

    collapse

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Loading required package: ggformula
Loading required package: ggplot2
Loading required package: ggstance

Attaching package: 'ggstance'

The following objects are masked from 'package:ggplot2':

    GeomErrorbarh, geom_errorbarh


New to ggformula?  Try the tutorials: 
	learnr::run_tutorial("introduction", package = "ggformula")
	learnr::run_tutorial("refining", package = "ggformula")
Loading required package: mosaicData
Loading required package: Matrix

The 'mosaic' package masks several functions from core packages in order to add 
additional features.  The original behavior of these functions should not be affected by this.

Note: If you use the Matrix package, be sure to load it BEFORE loading mosaic.

Attaching package: 'mosaic'

The following object is masked from 'package:Matrix':

    mean

The following object is masked from 'package:ggplot2':

    stat

The following objects are masked from 'package:dplyr':

    count, do, tally

The following objects are masked from 'package:stats':

    IQR, binom.test, cor, cor.test, cov, fivenum, median, prop.test,
    quantile, sd, t.test, var

The following objects are masked from 'package:base':

    max, mean, min, prod, range, sample, sum

Welcome to tigerstats!
To learn more about this package, consult its website:
	http://homerhanumat.github.io/tigerstats

	Linear Regression

Correlation coefficient r =  -0.1406 

Equation of Regression Line:

	 fastest = 124.6956 + -5.8111 * GPA 

Residual Standard Error:	s   = 20.8833 
R^2 (unadjusted):		R^2 = 0.0198 

tigerstats documentation built on July 2, 2020, 2:32 a.m.