stancsv2stantvafit {RStanTVA} | R Documentation |
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())
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. |
Value
The StanTVA fit object.
Examples
data <- read_tva_data("data.dat")
model <- stantva_code(locations = 6)
fit <- stancsv2stantvafit("chain1.csv", data, model)
fit
[Package RStanTVA version 0.3.0 Index]