A wrapper class for p_GeoDaWeight class

Fields

gda_w

An object of p_GeoDaWeight-class

is_symmetric

If weights matrix is symmetric

sparsity

Sparsity of weights matrix

min_neighbors

Minimum number of neighbors

max_neighbors

Maximum number of neighbors

num_obs

Number of observations

mean_neighbors

Mean number of neighbors

median_neighbors

Median number of neighbors

has_isolates

If the weights matrix has any isolates

Methods

GetNeighborWeights(idx)

Get weights values of neighbors for idx-th observation, idx starts from 0

GetNeighbors(idx)

Get neighbors for idx-th observation, idx starts from 0

GetPointer()

Get the C++ object pointer (internally used)

GetSparsity()

Get sparsity computed from weights matrix

HasIsolates()

Check if weights matrix has isolates, or if any observation has no neighbors

IsSymmetric()

Check if weights matrix is symmetric

SaveToFile(out_path, layer_name, id_name, id_values)

Save current spatial weights to a file.

out_path: The path of an output weights file
layer_name : The name of the layer of input dataset
id_name : The id name (or field name), which is an associated column contains unique values, that makes sure that the weights are connected to the correct observations in the data table.
id_values : The tuple of values of selected id_name (column/field)

SetNeighbors(idx, nbrs)

Set neighbors for one observation

SetNeighborsAndWeights(idx, nbrs, nbr_w)

Set neighbors with weights values for one observation

SpatialLag(values)

Compute spatial lag values for values of selected variable

Update(updateStats = TRUE)

Update the weights meta data

initialize(o_gda_w)

Constructor with a GeoDaWeight object (internally used)