myFormula outputs the model formula based on discrete variables and continuous variables.

myFormula(data, resp = NULL, dom = NULL, ...)

Arguments

data

the data frame.

resp

the response variable.

dom

the random effect dom could be "county","FIPS","state","zipcode".

...

Other parameters. fe.disc A vector of discrete/categorical fixed effects. fe.cont A vector of continuous fixed effects.

Value

Returns an object of class for model formula which is a symbolic formula based on the variables in the data set.

See also

Examples

# Using discrete and continuous variables. data <- eversmoke y <- "smoke_ever" dom <- "county" catX <- c("age","gender","year","race") contX <- "povt_rate" if (FALSE) { myFormula(data, resp = y, fe.disc = catX, fe.cont = contX) as.formula(myFormula(data, resp = y, fe.disc = catX, fe.cont = contX)) # Only using discrete variables resp <- "smoke_ever" dom <- "county" fe.disc <- c("age","gender","year") myFormula(data=eversmoke, resp="smoke_ever", dom="county", fe.disc) as.formula(myFormula(resp,fe.disc)) # None of the variables are defined, this only output the response variable. resp <- "smoke_ever" dom <- "county" myFormula(data=eversmoke, resp="smoke_ever", dom="county") }