Learn R Programming

geocausal (version 0.3.2)

predict_obs_dens: Perform out-of-sample prediction

Description

`predict_obs_dens()` performs out-of-sample prediction (separating data into training and test sets). It assumes that training and test sets have the same window.

Usage

predict_obs_dens(hfr, ratio, dep_var, indep_var, ngrid = 100, window)

Value

list of the following: * `indep_var`: independent variables * `coef`: coefficients * `intens_grid_cells`: im object of observed densities for each time period * `estimated_counts`: the number of events that is estimated by the poisson point process model for each time period * `sum_log_intens`: the sum of log intensities for each time period * `training_row_max`: the max row ID of the training set

Arguments

hfr

hyperframe

ratio

numeric. ratio between training and test sets

dep_var

dependent variables

indep_var

independent variables

ngrid

the number of grids. By default, `100`.

window

owin object