seq_br_norm_mean: seq_br_norm_mean

View source: R/seq_br_norm_mean.R

seq_br_norm_meanR Documentation

seq_br_norm_mean

Description

Sequential approach to Get Bounded Risk Point Estimation for normal random variables. Calculates the risk for a normal random variables.

Usage

seq_br_norm_mean(
  data = NULL,
  A,
  k,
  w,
  pilot = FALSE,
  verbose = FALSE,
  na.rm = TRUE
)

Arguments

data

The data for which to calculate the bounded risk point.

A

The loss function constant.

k

Controls whether the absolute error or squared error is used. K=1 uses absolute error, K=2 uses squared error.

w

The risk bound.

pilot

Should a pilot sample be generated. True/False value. default value is FALSE.

verbose

Should the criterion value be returned, True/False value, default value is FALSE.

na.rm

This parameter controls whether NA values are removed from the data prior to calculation. Default is TRUE.

Value

The calculated risk, the sample size, mean, standard deviation, and an indicator of if the criterion was satisfied.

Author(s)

Bhargab Chattopadhyay Bhargab@iiitvadodara.ac.in, Neetu Shah 201451015@iiitvadodara.ac.in

References

Mukhopadhyay, N., \& de Silva, Basil M. (2009). Sequential Methods and Their Applications. New York: CRC Press.

Examples

pilot_ss <- seq_br_norm_mean(A=2, k=1, w=0.4, pilot=TRUE)  # k=1 absolute error,
# k=2 squared error
SLS <- rnorm(pilot_ss, mean=2, sd=3)
seq_br_norm_mean(data=SLS, A=2, k=1, w=0.4, pilot=FALSE)

yelleKneK/SMSD documentation built on Nov. 23, 2022, 6:40 p.m.