R/ovary/ExploreLM.R

# 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)

}
premodelling/mixed documentation built on April 25, 2022, 6:27 a.m.