English 中文(简体)
我想知道如何使用混合储量包
原标题:I wonder how to use mixstock package
最佳回答

对我来说,这项工作是:

library(mixstock)
Z = simmixstock2(nsource=4,nmark=5,nmix=3,
          sourcesize=c(4,2,1,1),
          sourcesampsize=rep(25,4),
          mixsampsize=rep(30,3),rseed=1001)
Zfit0 = mm.wbugs(Z,sourcesize=c(4,2,1,1), pkg="JAGS", jags.seed = 101)
plot(Zfit0)

变化

  • use JAGS instead of WinBUGS (which may be nearly obsolete - in any case, hard to run on platforms other than Windows; I don t know the status of OpenBUGS), including setting the seed for the MCMC run
  • don t specify returntype = "bugs" (instead, the default "mixstock" option gives something that we can plot)

我不敢肯定你所说的话。

我能否把除随机数据外的我自己的数据输入“模拟存货2”的指挥?

simmixstock2(> function is Designed for simulating data in the case where Youoshi to see how what work when You teurs no own data. The vignette/walk through on pp. 4-5 如何输入多种混合储量的数据(在矩阵中增加一栏)(加列= ha类、一栏=来源和混合储量),并在使用<代码>时具体说明混合储量的数量(<代码>nmix=1(因缺)。

问题回答

谢谢。

我解决了第一个问题。 在你的手册中打上正确的图表。

但是,我仍然用我的数据 st在第二个问题上。

mydata = read.csv("testfile1.csv")
head(mydata)
    YYM OKN AMM OGS SEA FSM CEP JP
1.1   0   0   0   0   0   0 146   0
2.1   0   0   0   0   0   0  29   0
3.1   0   0   0   0   0   0  21   0
3.2   0   0   0   0   0   0  15   0
4.1   0   0   0   0   0   0  13   0
4.2   0   0   0   0   0   0   2   0

mydata = as.mixstock.data(mydata)
mydata0 = mm.wbugs(mydata,sourcesize=c(1,1.8,3.7,4.1,42,51.1,21.5), pkg="JAGS", jags.seed = 101)
**Error in 1:MIX : argument of length 0**

我认为,我不理解消息来源,也不了解其他东西。 是否有解决办法?

感谢您的帮助。 a. 有一天





相关问题
Separating Business Layer Errors from API errors

The title is horrible, i know; I m terrible at titles on SO here. I m wondering what would be the best way to present unified error responses in a webapi when errors could be raised deep inside the ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

How to tell why a file deletion fails in Java?

File file = new File(path); if (!file.delete()) { throw new IOException( "Failed to delete the file because: " + getReasonForFileDeletionFailureInPlainEnglish(file)); } Is there a ...

Exceptions: redirect or render?

I m trying to standardize the way I handle exceptions in my web application (homemade framework) but I m not certain of the "correct" way to handle various situations. I m wondering if there is a ...

热门标签