get y (right hand of var)

1 |

`Formula` |
a formula to be paste. |

`method` |
either |

What do 'raw' variable, 'model' variable, and 'coeff' variable mean?

raw var is the underlying variable without any calculation or transformation.

model var is the underlying variable with calculations or transformation.

coeff var is the coefficient variable in the model output. So only evaluated model has coeff var.

In the formula, `log(y) ~ x1 + x2`

, we have:
'raw' variable for `y`

: `y`

'model' variable for `y`

: `log(y)`

'coeff' variable for `y`

: `log(y)`

More examples see the sample code below.

y in formula

1 2 3 4 5 6 7 8 9 10 11 | ```
get_y(log(price) ~sdfsf + dsa )
get_y(log(price) ~ sdfsf + dsa, method = "model")
get_y(log(price) ~ sdfsf + dsa, method = "coeff") # same as model var in the get_y() case
# can deal with un-regular formula
get_y(log(price) ~sdfsf + dsa ~ dsad)
get_y(log(price) ~ sdfsf + dsa ~ dsad, method = "coeff")
get_y(log(price) ~ sdfsf + dsa ~ dsad, method = "model")
model_dirty = model = lm(price~ I(carat^ 2) + cut - carat:table - cut ,ggplot2::diamonds)
get_y(model_dirty)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.