Skip to content

Commit

Permalink
docs: add extra PD plot to vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-davison committed Aug 11, 2024
1 parent 3ccfc40 commit 18b73a4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion vignettes/articles/deweather.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,19 @@ plot2Way(mod_no2, variable = c("ws", "air_temp"))

## Apply meteorological averaging

An indication of the meteorologically-averaged trend is given by the `plotPD()` function above (and can even be isolated using the `variable` argument). A better indication is given by using the model to predict many times with random sampling of meteorological conditions. This sampling is carried out by the `metSim()` function. Note that in this case there is no need to supply the `"trend"` component because it is calculated using `metSim()`.
An indication of the meteorologically-averaged trend is given by the `plotPD()` function above, and can even be isolated using the `variable` argument.

```{r}
#| label: "pd-trend"
#| fig.width: 7
#| fig.height: 3.5
#| fig.cap: "The partial dependence plot of the 'trend' component."
#| fig.alt: "Patial dependence plot of the 'trend' component of the deweather model
#| with date on the x-axis and NO2 on the y-axis. The trend is jagged, but shows an increase in 2003."
plotPD(mod_no2, variable = "trend")
```

A better indication is given by using the model to predict many times with random sampling of meteorological conditions. This sampling is carried out by the `metSim()` function. Note that in this case there is no need to supply the `"trend"` component because it is calculated using `metSim()`.

```{r}
#| label: "metSim"
Expand Down

0 comments on commit 18b73a4

Please sign in to comment.