Hi Yuchao,
I met an error when running on
canopy.post, so I tuned the parameters to make it work. Unfortunately I met another error when running on canopy.output, I found the reason, but don't know how to fix it.
after running
canopy.post, we set
config = post[[3]]
config.summary = post[[4]]
we calculate config.i for the highest posterior likelihood by get the max value of Mean_post_lik from config.summary, the value from config.i, in my case, is 15, which doesn't match to any value in config, below is config.
> config
[1] 1 1 2 2 3 3 4 4 5 5 5 6 6 7 7 8 8 8 8 8 9 9 41 42 51
[26] 52 12 12 12 13 13 62 17 17 74 20 20 76 79 21 21 22 22 23 23 83 84
in this situation, tree.loc doesn't have any value, the error message is:
> output.tree = canopy.output(post, config.i, C=NULL)
Error in samptreethin[[tree.loc[which.max(samptreethin.lik[tree.loc])]]] :
attempt to select less than one element in get1index
Could you please let me know how to fix it?
Thanks so much.
Emily