Skip to contents

Function to impose a re-distribution impact effect

Usage

genRedistData(
  model,
  data,
  changecoef.link,
  panels = NULL,
  eventsite.bnd = NULL,
  noneventcells = NULL
)

Arguments

model

A glm or gamMRSea model object.

data

Data frame used to fit model

Coefficient(s) on the scale of the link function to determine the change in the population. If of length 1, then the change occurs in the impact zone, whilst maintaining overall population size. If of length 2, then there is a redistribution of the population with an an additional overall decrease.

panels

Character vector denoting the column of data containing the panel structure.

eventsite.bnd

A data frame containing the coordinates of a polygon defining the region of the defined event The variable names must match the coordinate system in the data.

noneventcells

vector of zeros and ones of length the same as data. zeros represent event cells and ones represent non-event cells.

Value

Returns a data frame twice the size of the original input with additional columns for panel id, eventphase and truth. The truth column represents the input data for the first half (pre-event; eventphase==0) and the second half has the change imposed (post-event; eventphase==1).

Author

Lindesay Scott-Hayward, University of St Andrews