Skip to contents

Wraps an existing spdep neighbour list, for example the lattice built by lamp_simulate(), in the object the spillover estimators expect.

Usage

lamp_adjacency_from_nb(nb, areas, method = "supplied")

Arguments

nb

An spdep neighbour list.

areas

Area identifiers in the same order as nb.

method

Label recorded in the object.

Value

A lamp_adjacency object.

Examples

sim <- lamp_simulate(n_areas = 16, n_months = 12, design = "spillover", seed = 1)
truth <- attr(sim, "truth")
lamp_adjacency_from_nb(truth$nb, truth$lattice$area)
#> streetlamp adjacency: 16 areas, supplied contiguity, 48 links, 0 islands.