extract predicted values

20 views
Skip to first unread message

Bethany Bethke

unread,
Jan 31, 2023, 11:12:00 AM1/31/23
to tRophicPosition
Hello,

I'm trying to use the function 'extractPredictiveData' but I'm having some trouble. Right now I'm stuck at this error message: 
Error in (function (..., deparse.level = 1) : cannot coerce type 'closure' to vector of type 'list'

I've been trying to use the documentation to get through, but this has me puzzled:
# Generate posterior samples of TP, alpha and dNcPred 
# dNcPred stands for the predicted data dNc (nitrogen values of consumer) 
samples_d <- posteriorTP(model_d, variable.names = c("TP", "alpha", "dNcPred"), burnin = 5000, n.iter = 5000, thin = 10) 
# Extract posterior predictive data 
dNcPred <- extractPredictiveData(samples_predicted, get = "dNcPred")
---
It definitely seems simple enough, except I'm not sure where the highlighted dataframe, samples_predicted, is generated. I thought we were to pass the dataframe generated by posteriorTP (samples_d). Where does samples_predicted come from?

Thanks!
Bethany
Reply all
Reply to author
Forward
0 new messages