Cmdstanr: Decide what print should do for fitted model objects

Created on 13 Oct 2019  路  3Comments  路  Source: stan-dev/cmdstanr

What should the $print() methods show for the different fitted model objects? Is it different than $summary() These include CmdStanMCMC, CmdStanMLE, and CmdStanVB objects, and eventually also CmdStanGQ objects once implemented.

question

Most helpful comment

On a related note, how do I get the docs for fit$function()? Normally I'd do ?function but it's not clear how to get the docs in Rstudio.

For the model you get those by running ?CmdStanModel, ?CmdStanMCMC is the object returned by sample. CmdStanMLE is for optimize(), etc.

All 3 comments

I liked how it printed out the different methods I might call on the object. A cleaner version of that might be nice (so I can easily tell what my options are). I guess that's significantly different behavior than the interfaces now though.

On a related note, how do I get the docs for fit$function()? Normally I'd do ?function but it's not clear how to get the docs in Rstudio.

On a related note, how do I get the docs for fit$function()? Normally I'd do ?function but it's not clear how to get the docs in Rstudio.

For the model you get those by running ?CmdStanModel, ?CmdStanMCMC is the object returned by sample. CmdStanMLE is for optimize(), etc.

I liked how it printed out the different methods I might call on the object. A cleaner version of that might be nice (so I can easily tell what my options are). I guess that's significantly different behavior than the interfaces now though.

@bbbales2 I like this too despite it being atypical of the interfaces. Right now it鈥檚 using the default print method for R6 objects but I could modify that a bit to group the methods together by functionality and provide some more info.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wlandau picture wlandau  路  12Comments

andrjohns picture andrjohns  路  6Comments

nerutenbeck picture nerutenbeck  路  4Comments

jgabry picture jgabry  路  5Comments

yizhang-yiz picture yizhang-yiz  路  4Comments