Skip to content

Commit

Permalink
Tweak new text about qcs_grid in README
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed May 30, 2024
1 parent 231c40b commit 1b666af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 1b666af

Please sign in to comment.