Description Usage Arguments Details Value See Also
A bunch of functions whose names start with pnbd
take a set of four
parameters as their first argument, and then a set of vectors or scalars such
as x
or T.cal
as their subsequent arguments. This function
started out as pnbd.InputCheck() and it was meant to run input checks for any
number of such subsequent vector arguments, as long as they all met the same
requirements as x
, t.x
and T.cal
in
pnbd.LL
: meaning, the length of the longest of these vectors is
a multiple of the lengths of all others, and all vectors are numeric and
positive.
1  dc.InputCheck(params, func, printnames = c("r", "alpha", "s", "beta"), ...)

params 
If used by 
func 
Function calling dc.InputCheck 
printnames 
a string vector with the names of parameters to pass to

... 
other arguments 
With an extra argument, printnames
, pnbd.InputCheck() could also
accommodate input checks for functions whose names start with bgbb
,
bgnbd
, and spend
so it was basically useful everywhere. That's
when it became dc.InputCheck()
. params
can have any length as
long as that length is the same as the length of printnames
, so
dc.InputCheck()
can probably handle mixtures of distributions for
modeling BTYD behavior that are not yet implemented.
By other arguments ... here we mean a bunch of named vectors that are used by
functions that call dc.InputCheck
, such as x, t.x, T.cal, etc. The
standard rules for vector operations apply  if they are not of the same
length, shorter vectors will be recycled (start over at the first element)
until they are as long as the longest vector. Vector recycling is a good way
to get into trouble. Keep vectors to the same length and use single values
for parameters that are to be the same for all calculations. If one of these
parameters has a length greater than one, the output will be a vector of
probabilities.
If all is well, a data frame with everything you need in it, with
nrow() equal to the length of the longest vector in ...
pnbd.LL
pnbd.ConditionalExpectedTransactions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.