Learn R Programming

PAWL (version 0.5)

normalizeweight: Normalize weights

Description

Simple function that normalize vectors (ie takes log weights and returns normalized weights, in the SMC context).

Usage

normalizeweight(log_weights)

Arguments

log_weights
Object of class "numeric": a real-valued vector

Value

The function returns an object of class "data.frame", with columns for the chain indices, the chain values, the iteration indices, and the associated log density values.

Details

Simple function that takes log weights (ie any real-valued vector), computes the exponential of it, divides it by its sum and returns it.

See Also

smc