Skip to content

Commit

Permalink
Merge branch 'francisvolh-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed May 30, 2024
2 parents c0b6fa3 + 1b666af commit 4dcb0e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +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:
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 4dcb0e2

Please sign in to comment.