linFit: Linear Fit and plot of data

Description Usage Arguments Details See Also Examples

Description

Fit a linear model to two variables, return basic output about the model, and plot the model.

Usage

1
linFit(simpleformula, data, xlab = NULL, ylab = NULL)

Arguments

simpleformula

a designation for the model formula in y ~ x notation. Must be in formula notation–see details.

data

a data frame in which to evaluate formulas.

xlab

optional. Text for x-axis title label for produced graph.

ylab

optional. Text for y-axis title label for produced graph.

Details

This function is one of a group of functions that take a specific input in the form of y ~ x, following (in-part) the mosaic package formula notation. However, only simple formulas are allowed with no grouping parameter, nor multiple predictor variables.

See Also

expFit logisticFit tripleFit

Examples

1
2
3
data(wolf)
linFit(Number ~ Year, data=wolf)
linFit(Number ~ Year, data=wolf, xlab="Year", ylab="Number of Wolves")

MichaelJMahometa/OnRampsR2 documentation built on Feb. 12, 2020, 12:32 a.m.