# Title : ExploreLM.R
# Objective : Linear regression and the ovary data
# Created by: greyhypotheses
# Created on: 03/04/2022
#'
#' @param data: a dta frame of the ovary data
#'
ExploreLM <- function (data) {
# linear regression
expr <- 'cos(2*pi*Time) + sin(2*pi*Time)'
model <- lm( as.formula(paste0('follicles', ' ~ ', expr)), data = data, x = TRUE)
estimates <- summary(object = model)
# the estimates
estimates$coefficients
stats::AIC(object = model)
stats::logLik(object = model)
stats::BIC(object = model)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.