From 7db1139014db8c36a765cfaf0cdbc212a4870fd4 Mon Sep 17 00:00:00 2001 From: "Simon P. Couch" Date: Mon, 13 Jul 2020 12:41:40 -0700 Subject: [PATCH] doc updates re: #897 --- DESCRIPTION | 2 +- NEWS.md | 3 +++ man/augment.Mclust.Rd | 6 ++++-- man/augment.betamfx.Rd | 6 ++++-- man/augment.betareg.Rd | 6 ++++-- man/augment.clm.Rd | 6 ++++-- man/augment.coxph.Rd | 6 ++++-- man/augment.decomposed.ts.Rd | 6 ++++-- man/augment.drc.Rd | 6 ++++-- man/augment.factanal.Rd | 6 ++++-- man/augment.felm.Rd | 6 ++++-- man/augment.fixest.Rd | 6 ++++-- man/augment.glm.Rd | 6 ++++-- man/augment.glmRob.Rd | 6 ++++-- man/augment.htest.Rd | 6 ++++-- man/augment.ivreg.Rd | 6 ++++-- man/augment.kmeans.Rd | 6 ++++-- man/augment.lm.Rd | 11 +++++++++-- man/augment.lmRob.Rd | 6 ++++-- man/augment.mfx.Rd | 6 ++++-- man/augment.mjoint.Rd | 6 ++++-- man/augment.nls.Rd | 6 ++++-- man/augment.pam.Rd | 6 ++++-- man/augment.plm.Rd | 6 ++++-- man/augment.poLCA.Rd | 6 ++++-- man/augment.polr.Rd | 6 ++++-- man/augment.prcomp.Rd | 6 ++++-- man/augment.rlm.Rd | 6 ++++-- man/augment.rma.Rd | 6 ++++-- man/augment.robustbase.glmrob.Rd | 6 ++++-- man/augment.robustbase.lmrob.Rd | 6 ++++-- man/augment.rq.Rd | 6 ++++-- man/augment.rqs.Rd | 6 ++++-- man/augment.sarlm.Rd | 6 ++++-- man/augment.speedlm.Rd | 6 ++++-- man/augment.stl.Rd | 6 ++++-- man/augment.survreg.Rd | 6 ++++-- man/glance.lm.Rd | 5 +++++ man/tidy.lm.Rd | 5 +++++ 39 files changed, 159 insertions(+), 71 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 10df0db1a..172070494 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -605,7 +605,7 @@ VignetteBuilder: Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.1.0.9000 +RoxygenNote: 7.1.1 Language: en-US Collate: 'aaa-documentation-helper.R' diff --git a/NEWS.md b/NEWS.md index 8737c1ade..4289ebcba 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,9 @@ To be released as broom 0.7.1. * Extended the `glance.aov()` method to include an `r.squared` column! +* Fixed `newdata` warning message in `augment.*()` output when the `newdata` +didn't contain the response variable—augment methods no longer expect the +response variable in the supplied `newdata` argument. (#897 by @rudeboybert) # broom 0.7.0 diff --git a/man/augment.Mclust.Rd b/man/augment.Mclust.Rd index 1291c55e8..d8fede590 100644 --- a/man/augment.Mclust.Rd +++ b/man/augment.Mclust.Rd @@ -39,8 +39,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.betamfx.Rd b/man/augment.betamfx.Rd index f77f87682..7e6584c40 100644 --- a/man/augment.betamfx.Rd +++ b/man/augment.betamfx.Rd @@ -60,8 +60,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.betareg.Rd b/man/augment.betareg.Rd index 1090f6c70..114c28147 100644 --- a/man/augment.betareg.Rd +++ b/man/augment.betareg.Rd @@ -61,8 +61,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.clm.Rd b/man/augment.clm.Rd index 985b61519..cf7e2b25a 100644 --- a/man/augment.clm.Rd +++ b/man/augment.clm.Rd @@ -53,8 +53,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.coxph.Rd b/man/augment.coxph.Rd index 0a009521d..dcc4036e6 100644 --- a/man/augment.coxph.Rd +++ b/man/augment.coxph.Rd @@ -61,8 +61,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.decomposed.ts.Rd b/man/augment.decomposed.ts.Rd index dcf18fb97..6c06b1ef5 100644 --- a/man/augment.decomposed.ts.Rd +++ b/man/augment.decomposed.ts.Rd @@ -44,8 +44,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.drc.Rd b/man/augment.drc.Rd index 4dddf2eb8..6b032138a 100644 --- a/man/augment.drc.Rd +++ b/man/augment.drc.Rd @@ -63,8 +63,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.factanal.Rd b/man/augment.factanal.Rd index 277127d87..55b9efbb0 100644 --- a/man/augment.factanal.Rd +++ b/man/augment.factanal.Rd @@ -49,8 +49,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.felm.Rd b/man/augment.felm.Rd index 19587e8ae..9609da191 100644 --- a/man/augment.felm.Rd +++ b/man/augment.felm.Rd @@ -39,8 +39,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.fixest.Rd b/man/augment.fixest.Rd index 80b806a03..724a3f0ad 100644 --- a/man/augment.fixest.Rd +++ b/man/augment.fixest.Rd @@ -42,8 +42,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.glm.Rd b/man/augment.glm.Rd index 39554abba..1486316cd 100644 --- a/man/augment.glm.Rd +++ b/man/augment.glm.Rd @@ -62,8 +62,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.glmRob.Rd b/man/augment.glmRob.Rd index d328068df..107a5ab9c 100644 --- a/man/augment.glmRob.Rd +++ b/man/augment.glmRob.Rd @@ -23,8 +23,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.htest.Rd b/man/augment.htest.Rd index 23ffd4a18..4b0dd01c7 100644 --- a/man/augment.htest.Rd +++ b/man/augment.htest.Rd @@ -32,8 +32,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.ivreg.Rd b/man/augment.ivreg.Rd index 5352ab4c5..77b0a72bb 100644 --- a/man/augment.ivreg.Rd +++ b/man/augment.ivreg.Rd @@ -44,8 +44,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.kmeans.Rd b/man/augment.kmeans.Rd index dcfcbe3df..57767a8b9 100644 --- a/man/augment.kmeans.Rd +++ b/man/augment.kmeans.Rd @@ -39,8 +39,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.lm.Rd b/man/augment.lm.Rd index 4d68433e2..7c6de4b97 100644 --- a/man/augment.lm.Rd +++ b/man/augment.lm.Rd @@ -48,8 +48,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information @@ -122,6 +124,11 @@ newdata <- mtcars \%>\% mutate(wt = wt + 1) augment(mod, newdata = newdata) +# predict on new data without outcome variable. Output does not include .resid +newdata <- newdata \%>\% + select(-mpg) +augment(mod, newdata = newdata) + au <- augment(mod, data = mtcars) ggplot(au, aes(.hat, .std.resid)) + diff --git a/man/augment.lmRob.Rd b/man/augment.lmRob.Rd index b14fbfe96..45fcaeb5b 100644 --- a/man/augment.lmRob.Rd +++ b/man/augment.lmRob.Rd @@ -44,8 +44,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.mfx.Rd b/man/augment.mfx.Rd index 261271781..0894a9459 100644 --- a/man/augment.mfx.Rd +++ b/man/augment.mfx.Rd @@ -107,8 +107,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.mjoint.Rd b/man/augment.mjoint.Rd index 78c9cfa75..eb0bbf0c1 100644 --- a/man/augment.mjoint.Rd +++ b/man/augment.mjoint.Rd @@ -51,8 +51,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.nls.Rd b/man/augment.nls.Rd index c1ff935f3..7012cd752 100644 --- a/man/augment.nls.Rd +++ b/man/augment.nls.Rd @@ -44,8 +44,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.pam.Rd b/man/augment.pam.Rd index a56027705..f52b37f70 100644 --- a/man/augment.pam.Rd +++ b/man/augment.pam.Rd @@ -39,8 +39,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.plm.Rd b/man/augment.plm.Rd index e21cb846f..0fc337224 100644 --- a/man/augment.plm.Rd +++ b/man/augment.plm.Rd @@ -39,8 +39,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.poLCA.Rd b/man/augment.poLCA.Rd index ea93dfb1f..07118b8fd 100644 --- a/man/augment.poLCA.Rd +++ b/man/augment.poLCA.Rd @@ -39,8 +39,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.polr.Rd b/man/augment.polr.Rd index 478acb46e..ab816fff9 100644 --- a/man/augment.polr.Rd +++ b/man/augment.polr.Rd @@ -54,8 +54,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.prcomp.Rd b/man/augment.prcomp.Rd index 5bedb66f1..ef8d9adb9 100644 --- a/man/augment.prcomp.Rd +++ b/man/augment.prcomp.Rd @@ -49,8 +49,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.rlm.Rd b/man/augment.rlm.Rd index dedb3e3e7..cc31666b2 100644 --- a/man/augment.rlm.Rd +++ b/man/augment.rlm.Rd @@ -48,8 +48,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.rma.Rd b/man/augment.rma.Rd index d92e20511..bad76fb23 100644 --- a/man/augment.rma.Rd +++ b/man/augment.rma.Rd @@ -33,8 +33,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.robustbase.glmrob.Rd b/man/augment.robustbase.glmrob.Rd index d825dd450..ceda3bed6 100644 --- a/man/augment.robustbase.glmrob.Rd +++ b/man/augment.robustbase.glmrob.Rd @@ -66,8 +66,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.robustbase.lmrob.Rd b/man/augment.robustbase.lmrob.Rd index 3bb84e962..d46729a9c 100644 --- a/man/augment.robustbase.lmrob.Rd +++ b/man/augment.robustbase.lmrob.Rd @@ -48,8 +48,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.rq.Rd b/man/augment.rq.Rd index 5e6aa668f..57247242a 100644 --- a/man/augment.rq.Rd +++ b/man/augment.rq.Rd @@ -59,8 +59,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.rqs.Rd b/man/augment.rqs.Rd index db1abf691..8069bc8e7 100644 --- a/man/augment.rqs.Rd +++ b/man/augment.rqs.Rd @@ -59,8 +59,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.sarlm.Rd b/man/augment.sarlm.Rd index eb5754c57..0a1e1160f 100644 --- a/man/augment.sarlm.Rd +++ b/man/augment.sarlm.Rd @@ -35,8 +35,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.speedlm.Rd b/man/augment.speedlm.Rd index 30c67f3f4..889b5b1fa 100644 --- a/man/augment.speedlm.Rd +++ b/man/augment.speedlm.Rd @@ -44,8 +44,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.stl.Rd b/man/augment.stl.Rd index ad7fb5ae1..c824be59b 100644 --- a/man/augment.stl.Rd +++ b/man/augment.stl.Rd @@ -48,8 +48,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/augment.survreg.Rd b/man/augment.survreg.Rd index d0eb36db3..11647f1b3 100644 --- a/man/augment.survreg.Rd +++ b/man/augment.survreg.Rd @@ -61,8 +61,10 @@ Users may pass data to augment via either the \code{data} argument or the \code{newdata} argument. If the user passes data to the \code{data} argument, it \strong{must} be exactly the data that was used to fit the model object. Pass datasets to \code{newdata} to augment data that was not used -during model fitting. This still requires that all columns used to fit -the model are present. +during model fitting. This still requires that at least all predictor +variable columns used to fit the model are present. If the original outcome +variable used to fit the model is not included in \code{newdata}, then no +\code{.resid} column will be included in the output. Augment will often behave differently depending on whether \code{data} or \code{newdata} is given. This is because there is often information diff --git a/man/glance.lm.Rd b/man/glance.lm.Rd index 22e4844c5..aef5de80c 100644 --- a/man/glance.lm.Rd +++ b/man/glance.lm.Rd @@ -70,6 +70,11 @@ newdata <- mtcars \%>\% mutate(wt = wt + 1) augment(mod, newdata = newdata) +# predict on new data without outcome variable. Output does not include .resid +newdata <- newdata \%>\% + select(-mpg) +augment(mod, newdata = newdata) + au <- augment(mod, data = mtcars) ggplot(au, aes(.hat, .std.resid)) + diff --git a/man/tidy.lm.Rd b/man/tidy.lm.Rd index 0365b4b81..5ea271b1e 100644 --- a/man/tidy.lm.Rd +++ b/man/tidy.lm.Rd @@ -70,6 +70,11 @@ newdata <- mtcars \%>\% mutate(wt = wt + 1) augment(mod, newdata = newdata) +# predict on new data without outcome variable. Output does not include .resid +newdata <- newdata \%>\% + select(-mpg) +augment(mod, newdata = newdata) + au <- augment(mod, data = mtcars) ggplot(au, aes(.hat, .std.resid)) +