correlation_lm_and_plot: Linear model fitting and plotting for 2 numerical variable

Description Usage Arguments Value Examples

View source: R/correlation_lm_and_plot.R

Description

Linear model fitting and plotting for 2 numerical variable

Usage

1

Arguments

data

specifies the data set which the variables are found

var1

the first variable in the relationship, has to be numerical

var2

the second variable in the relationship, has to be numerical

Value

a list consisting of a tidied up linear model and a plot the plot is a baseline scatter plot of the 2 variables, a linear line of best fit is present on top of the scatter plot

Examples

1
2
correlation_lm_and_plot(datateachr::cancer_sample, datateachr::cancer_sample$ID, datateachr::cancer_sample$concavity_mean)
correlation_lm_and_plot(datateachr::cancer_sample, datateachr::cancer_sample$concave_points_mean, datateachr::cancer_sample$concavity_mean)

britttheuser/stat545B2 documentation built on Dec. 19, 2021, 11:46 a.m.