Description Usage Arguments Value Examples
This function takes in an MTR formula, and then parses the formula
such that it becomes a polynomial in the unobservable u
. It
then breaks these polynomials into monomials, and then integrates
each of them with respect to u
. Each integral corresponds to
E[md  D, X, Z].
1 2 3 4 5 6 7  polyparse(
formula,
data,
uname = "u",
env = parent.frame(),
as.function = FALSE
)

formula 
the MTR. 
data 

uname 
variable name for unobservable used in declaring the MTR. 
env 
environment, the original environment in which the formula was declared. 
as.function 
boolean, if 
A list (of lists) of monomials corresponding to the
original MTR (for each observation); a list (of lists) of the
integrated monomials; a vector for the degree of each of the
original monomials in the MTR; and a vector for the names of
each variable entering into the MTR (note x^2 + x
has
only one term, x
).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  dtm < ivmte:::gendistMosquito()
## Declare MTR functions
formula1 = ~ 1 + u
formula0 = ~ 1 + u
## Construct MTR polynomials
polynomials0 < polyparse(formula = formula0,
data = dtm,
uname = u,
as.function = FALSE)
polynomials1 < polyparse(formula = formula0,
data = dtm,
uname = u,
as.function = FALSE)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.