`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
)
an im object of baseline density
owin object
"in" (using in-sample data) or "out" (using out-of-sample data)
the number of dimensions of grid cells (ndim^2). By default, ndim = 256.
dataframe (if using out-of-sample data)
vector of column names of longitudes and latitudes (in this order) (if using in-sample data)
hyperframe (if using in-sample data)
the name of the dependent variable (if using in-sample data)
the names of time-invariant independent varaibles (if using in-sample data)
for random sampling of data (if using in-sample data)