Learn R Programming

SMARTAR (version 1.0.0)

getncp: get non-centralized parameter

Description

Return the value of non-centralized parameter for the chi-square distribution given type I, II error and degrees of freedom.

Usage

getncp(df, alpha = 0.05, beta = 0.2, d = 1e-04, start = 5,
  dec = 2)

Arguments

df

Degrees of freedom of chi-square test

alpha

Type I error rate of chi-square test. The default alpha=0.05

beta

Type II error rate of chi-square test. The default beta=0.20

d

Critical value of distance of the searching procedure. The search of non-centralized parameter value stops at the absolute distance between the actual power and the target power less than the value of d. The default value of d=0.0001

start

Initial value of searching the non-centralized parameter.

dec

A numeric number to specify the decimal of the output parameter value. The default of dec=2.

Value

The value of non-centralized parameter for the chi-square distribution