View source: R/get_base_dens.R
get_base_dens | R Documentation |
'get_base_dens()' takes a dataframe and returns the baseline densities using Scott's rule of thumb (out-of-sample data) or fitting an inhomogeneous Poisson model (in-sample data) by regressing the in-sample data on time-invariant covariates.
get_base_dens(
window,
option,
ndim = 256,
out_data,
out_coordinates = c("longitude", "latitude"),
hfr,
dep_var,
indep_var,
ratio
)
window |
owin object |
option |
"in" (using in-sample data) or "out" (using out-of-sample data) |
ndim |
the number of dimensions of grid cells (ndim^2). By default, ndim = 256. |
out_data |
dataframe (if using out-of-sample data) |
out_coordinates |
vector of column names of longitudes and latitudes (in this order) (if using in-sample data) |
hfr |
hyperframe (if using in-sample data) |
dep_var |
the name of the dependent variable (if using in-sample data) |
indep_var |
the names of time-invariant independent varaibles (if using in-sample data) |
ratio |
for random sampling of data (if using in-sample data) |
an im object of baseline density
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.