RWiener (version 1.3-1)

tests: Wiener Diffusion model test functions

Description

Calculates test scores and further information for wdm model objects.

Usage

# S3 method for wdm
anova(object, …, test="LRT")
  # S3 method for 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

Run this code
# NOT RUN {
# a random dataset
dat <- rbind(cbind(rwiener(100, 2,.3,.5,0), grp="A"),
cbind(rwiener(100,2,.3,.5,1), grp="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
# }

Run the code above in your browser using DataCamp Workspace