designManyGroups {lestat} | R Documentation |
A design matrix is created, to be used for the analysis of data assumed to come from several normal distributions.
designManyGroups(v)
v |
A vector of integers, indicating how many observations there are in each group. |
A matrix consisting of 0's and 1's. The number of columns is equal to the
length of v
. The number of rows is equal to the sum of teh values of
v
.
Petter Mostad <mostad@chalmers.se>
designOneGroup
, designTwoGroups
, designBalanced
, designFactorial
data1 <- simulate(normal(3.3, log(2)), 9)
data2 <- simulate(normal(4.5, log(2)), 8)
data3 <- simulate(normal(2.9, log(2)), 7)
design <- designManyGroups(c(9,8,7))
posterior <- linearmodel(c(data1, data2, data3), design)
plot(posterior)