knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
A R package to fit aggregated data model.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("gabrielfranco89/aggrmodel")
This is a basic example which shows you how to solve a common problem:
library(aggrmodel) df = simuData mkt = attr(df, "market") df = subset(df, cluster==1) mkt = subset(mkt, group %in% unique(df$group)) aggrFit = aggrmodel(data = df, ## Your data market = mkt, ## Data market Y = y, ## Dep. variable timeVar =time, ## Time variable groupVar = group, ## Group variable repVar = rep, ## Replicate variable n_basis = 7) ## Number of basis functions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.