se_sig: Calculate One-Sided Confidence Level (%)

View source: R/loopFuns.R

se_sigR Documentation

Calculate One-Sided Confidence Level (%)

Description

Computes the one-sided confidence level, defined as (1 - p-value) x 100, for testing whether each mean (mu) differs from zero under a normal approximation.

Usage

se_sig(muvari)

Arguments

muvari

Numeric array, of mean (location) values, variances corresponding to each mu to test against zero.

Details

For each element:

  1. Calculate the standard error: se = sqrt(vari).

  2. Compute the absolute z-score: z = abs(mu / se).

  3. The one-sided p-value is 1 - phi(z), where phi is the CDF of the standard normal.

  4. The confidence level is (1 - p-value) x 100 = phi(z) x 100.

Value

A numeric vector of confidence levels (0-100%), each rounded to one decimal place.

Examples

# Single value
se_sig(muvari = cbind(2,1))

# Vector of values
se_sig(muvari = cbind(c(-1, 0, 1),c(1, 2, 3)))


loopevd documentation built on June 23, 2025, 5:09 p.m.