tests {RWiener}R Documentation

Wiener Diffusion model test functions

Description

Calculates test scores and further information for wdm model objects.

Usage

  ## S3 method for class 'wdm'
anova(object, ..., test="LRT")
  ## S3 method for class 'wdm'
waldtest(object, ..., theta="delta", theta0=0)

Arguments

object

a wdm model object.

test

Statistical test to calculate, so far the only option is a likelihood-ratio test (LRT).

...

Further model objects or other arguments passed to methods.

theta

the name of the parameter to be tested.

theta0

the value of the parameter under the null hypothesis.

Details

The anova.wdm function calls the specified test and calculates the test statistics and other information for two or more nested wdm model objects.

The waldtest.wdm function can be used to conduct a Wald test for a single parameter.

Examples

# a random dataset
dat <- rbind(cbind(rwiener(100, 2,.3,.5,0), grp=factor("A", c("A","B"))),
cbind(rwiener(100,2,.3,.5,1), grp=factor("B", c("A","B"))))

# create nested wdm model objects (from specific to general)
wdm1 <- wdm(dat)
wdm2 <- wdm(dat,
            alpha=coef(wdm1)[1], tau=coef(wdm1)[2], beta=coef(wdm1)[3],
            xvar="grp")
wdm3 <- wdm(dat,
            tau=coef(wdm1)[2],
            xvar="grp")

# conduct LRT tests
anova1 <- anova(wdm1,wdm2,wdm3)
anova1

# waldtest
wt1 <- waldtest(wdm1, theta="delta", theta0=0)
wt1

[Package RWiener version 1.3-3 Index]