Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slice sampler bug if first parameter 'Nominal' etc. #3

Open
mmoutou opened this issue Jun 15, 2017 · 3 comments
Open

Slice sampler bug if first parameter 'Nominal' etc. #3

mmoutou opened this issue Jun 15, 2017 · 3 comments

Comments

@mmoutou
Copy link

mmoutou commented Jun 15, 2017

Hi, if a simple model with only one categorical parameter is used in LaplacesDemon, I get:

Fit <- LaplacesDemon(Model, Data=D, Initial.Values=IV,
Covar=NULL, Iterations=2000, Status=100, Thinning=10,
Algorithm="Slice", Specs=list(B=NULL, Bounds=c(1,2), m=100,
Type="Nominal", w=1))
...
Error in .mcmcslice(Model, Data, Iterations, Status, Thinning, Specs, :
object 'prop' not found

in .mcmcslice it looks as if prop is not initialized if the first parameter isn't 'Continuous'.
The code can easily be made to work by adding the following before the call above. However it would be good if this was fixed in the .mcmcslice itself.

Mo0 <- Model(IV, D); prop <- Mo0[["parm"]];

Also, might it be possible to add some example argument lists for categorical variables? For example, the Examples.pdf file says e.g. that a mixture model was fitted with this sampler, but does not give the example arguments for the LaplacesDemon call. For those of us who are not familiar esp. with the w argment, it would be very useful to have some guidance about arguments for the categorical parameters.

Many thanks,
Michael.

@singmann
Copy link
Contributor

I am not actively maintaining the package. Feel free to make the changes and submit a pull request. If the code looks reasonable I will likely accept it.

@mmoutou
Copy link
Author

mmoutou commented Jun 15, 2017 via email

@singmann
Copy link
Contributor

This issue is now publicly visible and thereby googleable. Anybody interested in working on LaplacesDemon is able to see it, can comment, or provide a patch.
But getting started with github is not difficult. You simply need to fork the project, clone your version, write the patch in your version and push it, see if R CMD check still runs and then create a pull request with the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants