Computes the likelihood profile by evaluating the log-likelihood function across a grid of p_values while keeping all other parameters at their MLE.
compute_likelihood_profile(
p_estimate,
p_se,
simulation_function,
observed_weights,
sigma_estimate,
grid_size = 50,
grid_range_factor = 3
)Data frame with p_values and corresponding log_likelihoods
Central p_value (MLE estimate)
Standard error of p_value
Function that runs simulation and returns target metric
Vector of observed weights
Estimated sigma parameter
Number of points in profile grid, default 50
Range factor around estimate (±factor*SE), default 3