Description Usage Arguments Value Examples
View source: R/simuFunctions.R
Simulate aggregated data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
B1 |
Number of groups from cluster 1 |
B2 |
Number of groups from cluster 2 |
nRep |
Number of replicates |
market |
Optional. Insert the market as a data frame with the columns 'group', 'type' and 'num' |
market_range |
If market not inserted, the range to be sampled |
sigPar |
Parameters of sigma: vector of length 3 |
tauPar |
Parameters of tau: vector of length 3 |
corPar |
Parameters of correlation: vector of length 3 |
nu1 |
Functional of variance for cluster 1 (must be of length N) |
nu2 |
Functional of variance for cluster 2 (must be of length N) |
tmp_bt1 |
Beta parameters for winter temperature simulation. Must be of size 5*J*nRep. If NULL, rnorm(5*J*nRep,sd=2) will be used |
tmp_bt2 |
Beta parameters for summer temperature simulation. Must be of size 5*J*nRep. If NULL, rnorm(5*J*nRep,sd=2) will be used |
seed |
Optional. Seed to be used for simulation |
tempPar |
Default:1. If you do not want temperature effect, set temPar=0 |
Return a data frame with nRep replicates and 3 types of consumer observed in 48 times. Parameters and market are returned as attributes.
1 2 | dd = createSimuData()
dd = createSimuData(B1=4, B2=8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.