DesignM function creates the design matrix for fixed effects.

DesignM(data, fe.cont, fe.disc, ref.group)

Arguments

data

The data frame.

fe.cont

Vector of continuous variables.

fe.disc

Vector of discrete/categorical variables.

ref.group

Define the reference group for each discrete variable.

Value

A matrix.

Examples

data <- eversmoke re <- "county" fe.disc <- c("year","gender","race","age") fe.cont <- "povt_rate" ref.group <- c("age1", "gender2","race4","year1")