Learn R Programming

anchoredDistr (version 1.0.3)

calcLikelihood: Calculate the likelihood for the samples in a MADproject object.

Description

calcLikelihood returns an updated MADproject with the likelihood values based on the observation and realization data in the MADproject or, optionally, a subset thereof.

Usage

calcLikelihood(proj, dsubset, num_realz = max(proj@realizations$rid),
  samples = 1:proj@numSamples)

# S4 method for MADproject,numeric calcLikelihood(proj, dsubset, num_realz = max(proj@realizations$rid), samples = 1:proj@numSamples)

# S4 method for MADproject,ANY calcLikelihood(proj, num_realz, samples)

Arguments

proj

The MADproject object with data read from the MAD# databases.

dsubset

The subset of inversion data to use for the likelihood calculations.

num_realz

The number of realizations to use in the likelihood calculation (defaults to all in the realizations slot)

samples

A vector of sample IDs for which to calculate likelihood values (defaults to all available in the realizations slot)

Value

proj The updated MADproject object with a filled likelihood slot.

Methods (by class)

  • proj = MADproject,dsubset = numeric: Calculates the likelihood using a subset dsubset of inversion data zid

  • proj = MADproject,dsubset = ANY: Calculates the likelihood using all inversion data zid

Details

The likelihood calculation utilizes the np package for non- parametric density estimation with all inversion data as dependent (i.e. multivariate likelihood distributions are estimated).

Examples

Run this code
data(pumping)
pumping <- calcLikelihood(pumping, 100) #Inversion data as time step 100

Run the code above in your browser using DataLab