Learn R Programming

Sim.DiffProc (version 2.5)

test_ks_dexp: Kolmogorov-Smirnov Tests (Exponential Distribution)

Description

Performs one sample Kolmogorov-Smirnov tests.

Usage

test_ks_dexp(X, lambda)

Arguments

X
a numeric vector of data values.
lambda
vector of rates.

Value

  • A list with class "htest" containing the following components:
  • statisticthe value of the test statistic.
  • p.valuethe p-value of the test.
  • alternativea character string describing the alternative hypothesis.
  • data.namea character string giving the name(s) of the data.

Details

see detail ks.test.

Examples

Run this code
## Example 1
 X <- rexp(1000,c(1,2,3))
 test_ks_dexp(X, lambda=1)
 test_ks_dexp(X, lambda=2)
 test_ks_dexp(X, lambda=3)
## Example 2
 X <- rexp(1000,3)
 test_ks_dexp(X, lambda=3)
 test_ks_dweibull(X, shape=1, scale=(1/3))
 test_ks_dgamma(X, shape=1, rate=3)

Run the code above in your browser using DataLab