designManyGroups {lestat} | R Documentation |
Create a Design Matrix for Several Groups of Normal Observations
Description
A design matrix is created, to be used for the analysis of data assumed to come from several normal distributions.
Usage
designManyGroups(v)
Arguments
v |
A vector of integers, indicating how many observations there are in each group. |
Value
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
.
Author(s)
Petter Mostad <mostad@chalmers.se>
See Also
designOneGroup
, designTwoGroups
, designBalanced
, designFactorial
Examples
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)
[Package lestat version 1.9 Index]