Extracting stan code from stanarm

100 views
Skip to first unread message

Kurtis Goad

unread,
Oct 26, 2020, 1:22:55 PM10/26/20
to PSYC757
So, is it supposed to take an eternity to extract the stan code from a model made with the stanarm function? 

I'm trying to figure out if its worth waiting for (still waiting after almost half an hour) or if I should just take a sample from the data and try a model with that instead of the whole 4800 something in the original data set...

Patrick McKnight

unread,
Oct 26, 2020, 3:05:34 PM10/26/20
to Kurtis Goad, PSYC757
Probably best to move on...



On Mon, Oct 26, 2020 at 1:22 PM Kurtis Goad <kurtis...@gmail.com> wrote:
So, is it supposed to take an eternity to extract the stan code from a model made with the stanarm function? 

I'm trying to figure out if its worth waiting for (still waiting after almost half an hour) or if I should just take a sample from the data and try a model with that instead of the whole 4800 something in the original data set...

--
Check out the Course Website: https://sites.google.com/view/gmupsyc757/home
---
You received this message because you are subscribed to the Google Groups "PSYC757" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psyc757+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psyc757/3653fa29-f49a-4b0f-9a48-9b8ddb36619fn%40googlegroups.com.

Kurtis Goad

unread,
Oct 26, 2020, 3:14:18 PM10/26/20
to Patrick McKnight, PSYC757
So I have a smaller sample of the data now but when I run the get_stancode() function I keep getting this error message:

Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘get_stancode’ for signature ‘"stanreg"’

My guess is this is because the model is a stanreg object rather than a stanfit object but I can't figure out how to make a stanfit object rather than stanreg when using rstanarm
Heres the code I used:

model100 <- stan_lm(difi_paro ~ dgOffer, data=data100, prior = NULL)
get_stancode(model100)
Reply all
Reply to author
Forward
0 new messages