st_augment {sfislands} | R Documentation |
Augment dataframe with predictions of model
Description
Augment dataframe with predictions of model
Usage
st_augment(model, df)
Arguments
model |
an 'mgcv', 'lme4' or 'nlme' model. |
df |
an 'sf' data frame to be augmented with model predictions. |
Value
An augmented 'sf' data frame with extra columns showing estimates of random effects from model.
Examples
prepdata <- st_bridges(uk_election,"constituency_name")
mgcv::gam(health_not_good ~
s(constituency_name, bs='mrf', xt=list(nb=prepdata$nb), k=100),
data=prepdata, method="REML") |>
st_augment(uk_election)
[Package sfislands version 1.0.0 Index]