ljrb: Perform backward joinpoint selection algorithm with upper...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/ljrb.R

Description

This function performs the backward joinpoint selection algorithm with K maximum possible number of joinpoints based on the likelihood ratio test statistic. The p-value is determined by a Monte Carlo method.

Usage

1
ljrb(K,y,n,tm,X,ofst,R=1000,alpha=.05)

Arguments

K

the pre-specified maximum possible number of joinpoints

y

the vector of Binomial responses.

n

the vector of sizes for the Binomial random variables.

tm

the vector of ordered observation times.

X

a design matrix containing other covariates.

ofst

a vector of known offsets for the logit of the response.

R

number of Monte Carlo simulations.

alpha

significance level of the test.

Details

The re-weighted log-likelihood is the log-likelihood divided by the largest component of n.

Value

pvals

The estimates of the p-values via simulation.

Coef

A table of coefficient estimates.

Joinpoints

The estimates of the joinpoint, if it is significant.

wlik

The maximum value of the re-weighted log-likelihood.

Author(s)

The authors are Michal Czajkowski, Ryan Gill, and Greg Rempala. The software is maintained by Ryan Gill [email protected].

References

Czajkowski, M., Gill, R. and Rempala, G. (2008). Model selection in logistic joinpoint regression with applications to analyzing cohort mortality patterns. Statistics in Medicine 27, 1508-1526.

See Also

ljrk,ljrf

Examples

1
2
3
4
 data(kcm)
 attach(kcm) 
 set.seed(12345)
## Not run: ljrb(1,Count,Population,Year+.5,R=20)

ljr documentation built on May 29, 2017, 10:22 a.m.