summLik | R Documentation |
Evaluation of inferred probability density as function of parameters and of (projected) summary statistics is implemented as a generic function summLik
.
This documentation deals mostly with its method for objects of class SLik_j
produced by the up-to-date version of the summary-likelihood workflow.
Given the (projected) statistics for the data used to build the SLik_j
object, and the fitted parameters, this returns the (log)likelihood, as the generic
logLik
extractor does. However, parameters can be varied (so that summLik
provides the likelihood function rather than simply its maximum), the data can be varied too, and likelihood profiles (or even full new estimates) are computed when an incomplete parameter vector (or even NULL) is specified.
summLik(object, parm, data, ...)
## S3 method for class 'SLik_j'
summLik(object, parm, data=t(get_from(object,"proj_data")),
log=TRUE, which="safe", constr_tuning = Inf,
newMSL=FALSE, ...)
object |
An |
parm |
Vector, data frame or matrix, containing coordinates of parameter points for which (log) likelihoods will be computed; or NULL. A profile will be computed if a single incomplete parameter vector is provided. A full new estimate will be computed in |
data |
Matrix of (projected, if relevant) summary statistics for which the likelihood of given parameters is to be computed. By default, the (projected) statistics for the data used to build the |
log |
Boolean: whether to return log likelihood or raw likelihood. Better ignored. |
which |
character string: |
constr_tuning |
Passed to |
newMSL |
Boolean. If this is TRUE and a profile was computed, attributes are added to the result (see Value). |
... |
further arguments passed to or from other methods. Currently only passed to |
Numeric vector, with optional attribute(s).
If no profile is computed, it may have attributes from the return value of predict.SLik_j
. If a profile is computed, the returned value has attribute "profpt"
giving the profile-maximizing parameter vector. Further, if newMSL=TRUE
, the following attributes are added: "newobs_MSL"
, a list with information about unconstrained summary-likelihood maximization (useful mainly when there are new data
); and "LRstat"
, the resulting log-likelihood ratio.
predict.SLik_j
) for case without profiling;
logLik
, the standard extractor of likelihood for the model fitted to the original data.
## Not run:
## Using 'slik_j' object from the example in help("example_reftable")
summLik(slik_j, parm=slik_j$MSL$MSLE+0.1)
# summLik() generalizes logLik():
summLik(slik_j, parm=slik_j$MSL$MSLE) == logLik(slik_j) # must be TRUE
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.