minimise_fit.jsodm_lv: Translate fit object into a smaller object for using in a...

View source: R/translate_fit_for_predict_only.R

minimise_fit.jsodm_lvR Documentation

Translate fit object into a smaller object for using in a webapp

Description

Translate fit object into a smaller object for using in a webapp

Usage

minimise_fit.jsodm_lv(fit, ndrawsample = NULL)

Arguments

fit

An object fitted by this package

ndrawsample

If non-null then the number of posterior draw samples to keep, must be less than the number of posterior samples in fit.

Value

An object of the same class as fit with nearly all data removed. Only data used for predictions remains.

Examples

fit <- readRDS("../Experiments/7_4_modelrefinement/fittedmodels/7_4_13_model_2lv_e13.rds")
fit <- msod:::translatefit(fit)
fit2 <- minimise_fit.jsodm_lv(fit)
saveRDS(fit2, file = "../farm_biodiversity_app/data/model_data.rds")

sustainablefarms/msod documentation built on March 6, 2023, 7:17 a.m.