Package 'ljr'

Title: Logistic Joinpoint Regression
Description: Fits and tests logistic joinpoint models.
Authors: Michal Czajkowski, Ryan Gill, Greg Rempala
Maintainer: Ryan Gill <[email protected]>
License: GPL (>= 2)
Version: 1.4-0
Built: 2024-12-08 06:58:09 UTC
Source: CRAN

Help Index


Kentucky yearly cancer mortality from 1999-2005.

Description

This table gives the yearly mortality counts due to neoplasms (ICD 10 codes C00-D48) and population sizes for Kentucky from 1999-2005. For more information, see http://wonder.cdc.gov/wonder/help/cmf.html.

Usage

data(kcm)

Format

A 7 by 3 data frame.

Source

Centers for Disease Control and Prevention, National Center for Health Statistics. Compressed Mortality File 1999-2005. CDC WONDER On-line Database, compiled from Compressed Mortality File 1999-2005 Series 20 No. 2K, 2008. Accessed at http://wonder.cdc.gov/cmf-icd10.html on May 5, 2008.


MLE with 0 joinpoints

Description

Determines the maximum likelihood estimate of model coefficients in the logistic joinpoint regression model with no joinpoints.

Usage

ljr0(y,n,tm,X,ofst)

Arguments

y

the vector of Binomial responses.

n

the vector of sizes for the Binomial random variables.

tm

the vector of observation times.

X

a design matrix containing other covariates.

ofst

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

Details

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

Value

Coef

A table of coefficient estimates.

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

ljr01,ljrb,ljrf

Examples

data(kcm)
 attach(kcm) 
 ljr0(Count,Population,Year+.5)

Perform test of 0 vs 1 joinpoints.

Description

This function tests the null hypothesis of 0 joinpoints versus the alternative of one joinpoint based on the likelihood ratio test statistic. The p-value is determined by a Monte Carlo method.

Usage

ljr01(y,n,tm,X,ofst,R=1000,alpha=.05)

Arguments

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

pval

The estimate of the p-value via simulation.

Coef

A table of coefficient estimates.

Joinpoint

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

ljr0,ljr1

Examples

data(kcm)
 attach(kcm)
 set.seed(12345)
## Not run: ljr01(Count,Population,Year+.5,R=20)

MLE with 1 joinpoint

Description

Determines the maximum likelihood estimates of model coefficients in the logistic joinpoint regression model with one joinpoint.

Usage

ljr1(y,n,tm,X,ofst,summ=TRUE)

Arguments

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.

summ

a boolean indicator of whether summary tables should be returned.

Details

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

Value

Coef

A table of coefficient estimates.

Joinpoint

The estimate of the joinpoint.

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

ljr01,ljrb,ljrf

Examples

data(kcm)
 attach(kcm)
 ljr1(Count,Population,Year+.5)

Test coefficients conditioned on K=1 joinpoint.

Description

This function performs the likelihood ratio tests to find p-values in testing the significance of each of the coefficients as well as the intercept and ordered observation times. The p-values are determined by a Monte Carlo method.

Usage

ljr11(y,n,tm,X,ofst,R=1000)

Arguments

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.

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.

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

ljr1

Examples

data(kcm)
 attach(kcm)
 set.seed(12345)
## Not run: ljr11(Count,Population,Year+.5,R=20)

Perform backward joinpoint selection algorithm with upper bound K.

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

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

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

Perform forward joinpoint selection algorithm with unlimited upper bound.

Description

This function performs the full forward joinpoint selection algorithm based on the likelihood ratio test statistic. The p-value is determined by a Monte Carlo method.

Usage

ljrf(y,n,tm,X,ofst,R=1000,alpha=.05)

Arguments

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,ljrb

Examples

data(kcm)
 attach(kcm)
 set.seed(12345)
## Not run: ljrf(Count,Population,Year+.5,R=20)

Perform test of j vs k joinpoints.

Description

This function tests the null hypothesis of j joinpoint(s) versus the alternative of k joinpoint(s) based on the likelihood ratio test statistic. The p-value is determined by a Monte Carlo method.

Usage

ljrjk(j,k,y,n,tm,X,ofst,R=1000,alpha=.05)

Arguments

j, k

pre-specified number of joinpoints in the null and alternative hpyotheses (the smaller is used for the null).

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

pval

The estimate of the p-value via simulation.

Coef

A table of coefficient estimates.

Joinpoint

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

Examples

data(kcm)
 attach(kcm)
 set.seed(12345)
## Not run: ljrjk(0,1,Count,Population,Year+.5,R=20)

MLE with k joinpoints

Description

Determines the maximum likelihood estimates of model coefficients in the logistic joinpoint regression model with k joinpoints.

Usage

ljrk(k,y,n,tm,X,ofst)

Arguments

k

the pre-specified number of joinpoints (with unknown locations).

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.

Details

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

Value

Coef

A table of coefficient estimates.

Joinpoints

The estimates of the joinpoints.

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

ljrb,ljrf

Examples

data(kcm)
 attach(kcm) 
 ljrk(1,Count,Population,Year+.5)

Test coefficients conditioned on K=k joinpoint.

Description

This function performs the likelihood ratio tests to find p-values in testing the significance of each of the coefficients as well as the intercept and ordered observation times. The p-values are determined by a Monte Carlo method.

Usage

ljrkk(k,y,n,tm,X,ofst,R=1000)

Arguments

k

the pre-specified number of joinpoints (with unknown locations).

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.

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.

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

Examples

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