Learn R Programming

tigerstats (version 0.1.6)

lmGC: Linear Regression

Description

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

Usage

lmGC(form,data=parent.frame(),graph=FALSE,diag=FALSE)

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 regression line
diag
produces diagnostic plots: density plot of residuals, and residuals vs. fits

Value

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

Examples

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

Run the code above in your browser using DataLab