knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(bis557)
A function to fit the linear model. Take a formula, a data frame and a list of constasts for factor variables as input. The output is a list of estimated coefficients.
A function to implement gradient descent for ordinary least squares. Take a formula, a data frame and a list of constasts for factor variables and some default values as input. The output is a list of estimated coefficients.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.