`library(simanalyse)
library(simcases)
library(coda)
set.seed(123)
lik <- "
Ew ~ dbin(p,N) # Weir data
p ~ dbeta(a,b) # GSI proportion
"
sd <- runif(1,0,0.1) ## standard deviation of p given by GSI
mu <- runif(1) ## mean of p given by GSI
rho <- mu*(1-mu)/sd^2-1
a <- rho*mu
b <- rho-a
const = list(N=500)
sigma = list(a=a,b=b)
all = "."
models_sims = "code constants parameters monitor
lik const sigma all"
smc_simulate(models = models_sims,
nsims = 1,
exists = NA,
ask = FALSE)`
Error in names(list_model) <- model_header :
'names' attribute [4] must be the same length as the vector [1]
`library(simanalyse)
library(simcases)
library(coda)
set.seed(123)
lik <- "
Ew ~ dbin(p,N) # Weir data
p ~ dbeta(a,b) # GSI proportion
"
sd <- runif(1,0,0.1) ## standard deviation of p given by GSI
mu <- runif(1) ## mean of p given by GSI
rho <- mu*(1-mu)/sd^2-1
a <- rho*mu
b <- rho-a
const = list(N=500)
sigma = list(a=a,b=b)
all = "."
models_sims = "code constants parameters monitor
lik const sigma all"
smc_simulate(models = models_sims,
nsims = 1,
exists = NA,
ask = FALSE)`
Error in names(list_model) <- model_header :
'names' attribute [4] must be the same length as the vector [1]