| IBIS.logreg.opts {UNCOVER} | R Documentation |
Additional argument generator for IBIS.logreg()
Description
This function is used to specify additional arguments to
IBIS.logreg.
Usage
IBIS.logreg.opts(
N = 1000,
ess = N/2,
n_move = 1,
weighted = FALSE,
prior.override = FALSE,
rprior = NULL,
dprior = NULL,
...
)
Arguments
N |
Number of particles for the SMC sampler. Defaults to 1000. |
ess |
Effective Sample Size Threshold: If the effective sample size of
the particles falls below this value then a resample move step is
triggered. Defaults to |
n_move |
Number of Metropolis-Hastings steps to apply each time a resample move step is triggered. Defaults to 1. |
weighted |
Should the outputted samples be weighted? Defaults to
|
prior.override |
Are you overriding the default multivariate normal
form of the prior? Defaults to |
rprior |
Function which produces samples from your prior if the default prior form is to be overridden. If using the default prior form this does not need to be specified. |
dprior |
Function which produces your specified priors density for inputted samples if the default prior form is to be overridden. If using the default prior form this does not need to be specified. |
... |
Additional arguments required for complete specification of the two prior functions given, if the default prior form is to be overridden. |
Details
This function should only be used to provide additional control
arguments to IBIS.logreg.
Specifying rprior and dprior will not override the default prior form
unless prior.override=TRUE. If a multivariate normal form is required then
the arguments for this prior should be specified in IBIS.logreg.
Value
A list consisting of:
NNumber of particles for the SMC sampler
essEffective Sample Size Threshold
n_moveNumber of Metropolis-Hastings steps
rpriorFunction which produces samples from your prior.
NULLifprior.override==FALSE.dpriorFunction which produces your specified priors density for inputted samples.
NULLifprior.override==FALSE.prior.overrideLogical value indicating if the prior has been overridden or not.
weightedLogical value indicating if the outputted particles of
IBIS.logregshould be weighted or not.MoreArgsA list of the additional arguments required for
rprioranddprior.NULLifprior.override==FALSE.
See Also
Examples
#Specifying a multivariate independent uniform prior
rmviu <- function(n,a,b){
return(mapply(FUN = function(min.vec,max.vec,pn){stats::runif(pn,a,b)},
min.vec=a,max.vec=b,MoreArgs = list(pn = n)))
}
dmviu <- function(x,a,b){
for(ii in 1:ncol(x)){
x[,ii] <- dunif(x[,ii],a[ii],b[ii])
}
return(apply(x,1,prod))
}
IBIS.logreg.opts(prior.override = TRUE,rprior = rmviu,
dprior = dmviu,a=rep(0,3),b=rep(1,3))