# RKeff

RKeff finds the constants c and M which are associated to the requested efficiency and ARP

## Syntax

• c=RKeff(eff,v)example
• c=RKeff(eff,v,ARP)example
• [c, M]=RKeff(___)example

## Description

 c =RKeff(eff, v) Find c given a value of efficiency.

 c =RKeff(eff, v, ARP) Find c and M given a value of efficiency.

 [c, M] =RKeff(___) Find the value of c for efficiency which goes to 1.

## Examples

expand all

### Find c given a value of efficiency.

c=RKeff(0.95,1)

### Find c and M given a value of efficiency.

The constant c associated to a nominal location efficiency of 95% in regression is c = 3.180662196584308

[c,M]=RKeff(0.95,5,0.05)

### Find the value of c for efficiency which goes to 1.

ef=0.75:0.01:0.99;
CC=[ef' zeros(length(ef),1)];
jk=0;
for j=ef
jk=jk+1;
CC(jk,2)=OPTeff(j,1);
end

## Input Arguments

### eff — required efficiency. Scalar.

Scalar which contains the required efficiency (of location or scale estimator).

Generally eff=0.85, 0.9 or 0.95

Data Types: single|double

### v — Number of response variables. Scalar.

e.g. in regression v=1

Data Types: single|double|int32|int64

### ARP — asymptotic rejection probability. Scalar.

The asymptotic rejection probability of an estimator is defined as the probability in large sample under a reference distribution that a Malanobis distance excees $c_0$, where $c_0=inf \{ u_0 | w(u)=0, \forall u>u_0 \}$.

$w(u)$ is the weight function (defined in RKwei.m). In other words, given $c_0=sup(\rho(u))$,if an estimator is normed to the normal distribution ARP is $1-F_{\chi^2_v}(c_0^2)$.

The default value of ARP is 0.05.

Example: 0.04 

Data Types: double

## Output Arguments

### c —Requested tuning constant. Scalar

Tuning constatnt of Rocke rho function (translated Tukey Biweight) associated to requested efficiency and asymptotic rejection probability

### M —Requested tuning constant. Scalar

Tuning constant of Rocke rho function (translated Tukey Biweight) associated to requested efficiency and asymptotic rejection probability