load saved model output #57
SvenjaSchwarck
started this conversation in
General
Replies: 1 comment 1 reply
-
|
Hi Svenja, is this an old fit that you want to load or one that you just ran? Fits from past ctsem versions are not guaranteed to work with summary and plot type functions from newer ctsem versions, but you can sometimes get around this by running ctStanFitUpdate on the old fit. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Charles,
I have question regarding the reloading of model a output. I ran the following model:
session.output<-ctStanFit(datalong = session_data, ctstanmodel = All.model , iter = 8000, chains = 4, plot = F, nopriors = F)
saved the session.output:
saveRDS(session.output, file = "C:/Users/session.output.rds")
and wanted to reload the model after quitting and starting a new R session:
session.output<-readRDS( "C:/Users/session.output.rds")
session.output is shown as a list and when I want to run summary(session.output)$popmeans I get:
Error in !object$standata$priors : invalid argument type
I'm a bit confused because 6 month ago I was able to load my session.output and summary(session.output)$popmeans. I didn't changed my script.
However, when I run my model again, save the session.output, quit and reopen R and load my model with exactly the same lines session.output is a Large ctStanFit and popmeans work.
My R version is 4.3.1
Best and thanks,
Svenja
Beta Was this translation helpful? Give feedback.
All reactions