diff --git a/README.Rmd b/README.Rmd index 97d8fed6..42b6cb70 100644 --- a/README.Rmd +++ b/README.Rmd @@ -185,8 +185,9 @@ ggeffects::ggpredict(fit, "depth [50:400, by=2]") |> plot() If the depth effect was parametric and not a penalized smoother, we could have alternatively used `ggeffects::ggeffect()` for a fast marginal effect plot. -Predict on new data: -(NOTE: we will use the qce_grid object inlcuded in the package which contains all the points (a raster equivalent) on which the model output will predicted new values) +Next, we can predict on new data. +We will use a data frame `qcs_grid` from the package, which contains all the locations (and covariates) at which we wish to predict. +Here, these `newdata` are a grid, or raster, covering our survey. ```{r} p <- predict(fit, newdata = qcs_grid) diff --git a/README.md b/README.md index d9a12634..1ee6dd43 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,8 @@ X <- matrix(rnorm(m*k), nrow=m); Y <- matrix(rnorm(n*k), ncol=n) system.time(X %*% Y) ``` -The result ('elapsed') should take a fraction of a second (e.g., 0.03 s), not -multiple seconds. +The result (‘elapsed’) should take a fraction of a second (e.g., 0.03 +s), not multiple seconds. ## Overview @@ -339,7 +339,10 @@ If the depth effect was parametric and not a penalized smoother, we could have alternatively used `ggeffects::ggeffect()` for a fast marginal effect plot. -Predict on new data: +Next, we can predict on new data. We will use a data frame `qcs_grid` +from the package, which contains all the locations (and covariates) at +which we wish to predict. Here, these `newdata` are a grid, or raster, +covering our survey. ``` r p <- predict(fit, newdata = qcs_grid)