| AI | R Documentation |
This function estimates variables observed at a "source" region into a "target" region. "Source" and "target" regions represent two different ways to divide a city, for example. For more details, see https://lcgodoy.me/smile/articles/sai.html.
ai(source, target, vars) ai_var(source, target, vars, vars_var, sc_vars = FALSE, var_method = "CS")
source |
a |
target |
a |
vars |
a |
vars_var |
a scalar of type |
sc_vars |
boolean indicating whether |
var_method |
a |
the target (of type sf) with estimates of the variables
observed at the source data.
data(nyc_surv)
data(nyc_comd)
## creating variables that store the variance for each area
## this is done to exemplify the functionality of the package
nyc_surv <- transform(nyc_surv,
my_var = moe / qnorm(p = .975))
nyc_surv <- transform(nyc_surv, my_var = my_var * my_var)
## Not run:
## areal interpolation
estimate_comd <-
ai(source = nyc_surv, target = nyc_comd,
vars = "estimate")
## areal interpolation with uncertainty estimation
estimate_comd <-
ai_var(source = nyc_surv, target = nyc_comd,
vars = "estimate", vars_var = "my_var",
var_method = "MI")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.