Learn R Programming

fb4package (version 2.0.0)

compute_likelihood_profile: Compute likelihood profile for p_value

Description

Computes the likelihood profile by evaluating the log-likelihood function across a grid of p_values while keeping all other parameters at their MLE.

Usage

compute_likelihood_profile(
  p_estimate,
  p_se,
  simulation_function,
  observed_weights,
  sigma_estimate,
  grid_size = 50,
  grid_range_factor = 3
)

Value

Data frame with p_values and corresponding log_likelihoods

Arguments

p_estimate

Central p_value (MLE estimate)

p_se

Standard error of p_value

simulation_function

Function that runs simulation and returns target metric

observed_weights

Vector of observed weights

sigma_estimate

Estimated sigma parameter

grid_size

Number of points in profile grid, default 50

grid_range_factor

Range factor around estimate (±factor*SE), default 3