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

could not find function "fitModel" #7

Open
psyxusheng opened this issue Dec 10, 2020 · 1 comment
Open

could not find function "fitModel" #7

psyxusheng opened this issue Dec 10, 2020 · 1 comment

Comments

@psyxusheng
Copy link

psyxusheng commented Dec 10, 2020

I runed an example code like:

EQNfile <- system.file("MPTmodels/2htsm.eqn", package="TreeBUGS")
d.encoding <- subset(arnold2013, group == "encoding", select = -(1:4))
fit <- betaMPT(EQNfile, d.encoding, n.thin=5,
               restrictions=list("D1=D2=D3","d1=d2","a=g"))

plot(fit, parameter = "mean", type = "default")
summary(fit)

how ever it gets : could not find function "fitModel"

What causes this?

@danheck
Copy link
Owner

danheck commented Dec 13, 2020

Unfortunately, I cannot reproduce this issue on Windows or Linux (using TreeBUGS 1.4.5, R 4.0.3, JAGS 4.3.0 and RStudio 1.3.1073). Did you update all packages? In specific, did you check whether JAGS is correctly installed and works within R (you can do this by installing and loading the rjags package)?

The function fitModel is an internal function of the TreeBUGS package. If the package has been loaded with library(TreeBUGS), the function should be available within the scope of the other functions such as betaMPT. Can you run the code when using traitMPT(...) instead of betaMPT(...)?

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