Arguments
g
the temporal interaction function. It must accept
    two arguments, the first one being a vector of time points, the
    second one a parameter vector. For marked twinstim, it must
    accept the type of the event (integer code) as its third
G
a primitive of $g(t)$ (with respect to time). It must
    accept the same arguments as g, for instance a vector
    of time points (not just a single one).
deriv
optional derivative of $g(t)$ with respect to
      the parameters. It takes the same arguments as g but
    returns a matrix with as many rows as there were time points in the
    input and npars columns. This derivativ
Deriv
optional primitive of deriv (with respect to
    time). It must accept the same arguments as deriv, g and
    G and returns a matrix with as many rows as there were time
    points in the input and 
npars
the number of parameters of the temporal interaction
    function g (i.e. the length of its second argument).
validpars
optional function taking one argument, the parameter vector, indicating if it
    is valid. This approach to specify parameter constraints is rarely
    needed, because usual box-constrained parameters can be taken into
    account by using L-BFGS-B as th