Learn R Programming

lestat (version 1.9)

designTwoGroups: Create a Design Matrix for Two Groups of Observations

Description

A design matrix is created, to be used for the analysis of data assumed to come from two normal distributions.

Usage

designTwoGroups(n, m)

Arguments

n

The number of data values in the first group.

m

The number of data values in the second group.

Value

A matrix consisting of 1's and 0's, with two columns, and with the number of rows given by \(n+m\).

See Also

designOneGroup, designManyGroups, designBalanced, designFactorial

Examples

Run this code
# NOT RUN {
data1 <- simulate(normal(3, log(2)), 7)
data2 <- simulate(normal(5, log(2)), 9)
design <- designTwoGroups(7,9)
posterior <- linearmodel(c(data1, data2), design)
credibilityinterval(marginal(posterior, 1))
# }

Run the code above in your browser using DataLab