README.md

aggrmodel

A R package to fit aggregated data model.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("gabrielfranco89/aggrmodel")

Example

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


gabrielfranco89/aggrmodel documentation built on June 1, 2020, 8:57 a.m.