Learn R Programming

RStanTVA (version 0.3.2)

stancsv2stantvafit: Read StanTVA fit from CSV

Description

This function may be used to read an RStan or CmdStan fit from CSV files. Note that you also need to provide the fitted model.

Usage

stancsv2stantvafit(csv_file, data, model, contrasts = list())

Value

The StanTVA fit object.

Arguments

csv_file

The CSV file to be read.

data

The data to which the model was fitted.

model

The fitted model as an StanTVA model or StanTVA code object.

contrasts

Any contrasts specified to factors in the data set.

Examples

Run this code
if (FALSE) {
data <- read_tva_data("data.dat")
model <- stantva_code(locations = 6)
fit <- stancsv2stantvafit("chain1.csv", data, model)
fit
}

Run the code above in your browser using DataLab