Learn R Programming

mcprofile (version 0.0-9)

makeDesign: Construction of a modified design matrix. Only for internal use.

Description

Given a contrast and a design matrix, a new designmatrix is constructed to enable the calculation of linear combinations of the original model parameters.

Usage

makeDesign(k, X)
pmakeDesign(k, X)

Arguments

k
a numeric vector with contrast coefficients
X
a design matrix

Value

  • a design matrix

Details

If both negative and positive contrast coefficients are provided, makeDesign sums up all design matrix coefficients corresponding to non-negative contrast coefficients as a new intercept. A dummy variable for a second parameter of interest is introduced as the sum of all design matrix entries corresponding to the positive contrast coefficients. If no negative contrast coefficient is found, pmakeDesign sets the intercept covariates to the entries of the first column of the design matrix corresponding to a negative contrast coefficient.