Description Usage Arguments Value See Also Examples
myFormula outputs the model formula based on discrete variables and continuous variables.
1 |
data |
the data frame. |
resp |
the response variable. |
dom |
the random effect |
... |
Other parameters. |
Returns an object of class for model formula which is a symbolic formula based on the variables in the data set.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # Using discrete and continuous variables.
data <- eversmoke
y <- "smoke_ever"
dom <- "county"
catX <- c("age","gender","year","race")
contX <- "povt_rate"
## Not run:
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")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.