knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) options(tibble.print_min = 5, tibble.print_max = 5)
lm.hw4 is a package to fit and analyze linear regression model, including following functions.
lm_fit() estimates the parameters of the linear regression models.lm_summary() summarizes the properties of the fitted model.lm_anova() computes analysis of variance (or deviance) tables for fitted model objects.install.packages("devtools") library(devtools) install_github("leyaozh/lm.hw4", build_vignettes = TRUE, force = TRUE)
library(lm.hw4) # use dataset mtcats as an example attach(mtcars) x = cbind(hp, wt, hp * wt) y = mpg z = lm_fit(x, y, add.intercept = TRUE, method = "qr") z z.summary = lm_summary(z, correlation = TRUE) z.summary z.anova = lm_anova(z) z.anova detach(mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.