You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a vignette on how to fill in missing strata using rema when developing a design-based index of abundance (e.g., for use in an age-structured model). Example: GOA dover sole
@Cole-Monnahan-NOAA, in this case would be it be appropriate to use the predicted value SD of the missing strata (converted to the natural scale) when summed with the other design-based variance estimates? Also pls feel free to add thoughts or other ideas for vignettes!
The text was updated successfully, but these errors were encountered:
For a future vignette (though variance calculations need to be double-checked) - this code takes rema output for predictions and data used and stitches together a survey biomass index (and variance) using design-based estimates for every strata where an estimate exists (every strata that was sampled) and filling in with rema estimates for the missing strata:
`# stitch design based strata with rema where there are design-based gaps:
surv_years<-unique(new_data$Year)
rema_by_strata_2023<-output$biomass_by_strata %>%
mutate(obs_var = (obs_cv*obs)^2,pred=exp(log_pred),pred_var = (exp(log_pred) * (sqrt(exp(sd_log_pred^2)-1)))^2) %>%
select(c(year,strata,pred,pred_var,obs,obs_var)) %>%
filter(year %in% surv_years) %>%
mutate(index = coalesce(obs,pred),index_var = coalesce(obs_var,pred_var)) %>%
group_by(year)
Add a vignette on how to fill in missing strata using rema when developing a design-based index of abundance (e.g., for use in an age-structured model). Example: GOA dover sole
@Cole-Monnahan-NOAA, in this case would be it be appropriate to use the predicted value SD of the missing strata (converted to the natural scale) when summed with the other design-based variance estimates? Also pls feel free to add thoughts or other ideas for vignettes!
The text was updated successfully, but these errors were encountered: