Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify Treatment of Response Variable #104

Open
n8layman opened this issue Dec 19, 2024 · 1 comment
Open

Clarify Treatment of Response Variable #104

n8layman opened this issue Dec 19, 2024 · 1 comment

Comments

@n8layman
Copy link
Collaborator

This issue is a place to record some notes about the response variable, as well as a place to discuss and record some of the decisions made when constructing the model.

For example, the current model structure is a binary classifier. However, each outbreak in the data provided by WAHIS has both an outbreak start date and an outbreak end date. Sometimes, that interval can be very long. For example, an outbreak of 12 cases was reported over an interval of 398 days. That's only ~0.03 cases per day across the interval.

One approach could be to use the interval as an offset. That would make sense if intervals reflected differing amounts of sampling effort, but instead, the interval is a characteristic of how that particular outbreak played out or was reported. Intervals here don't represent differences in 'exposure time' so I don't think it's appropriate to use them to standardize the modeled rates to a per-unit time basis.

The simplest solution would be to forecast whether an outbreak will start during the forecast interval. That's easy to convert to a binary value and has a more natural interpretation.

@n8layman
Copy link
Collaborator Author

This tracks with what Emma was doing as well as she's only referencing outbreak_start_date.

create_outbreak_layer

  # For each model selected date, determine which polygons had an outbreak in the following 30 days
  rvf_points_polygon_dates <- map_dfr(model_dates_selected, function(model_date){
    day_diff <- rvf_points_polygon$outbreak_start_date - model_date
    rvf_points_polygon[which(day_diff >= 1 & day_diff <= 30),] |> 
      mutate(date = model_date)
  })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant