https://github.com/cran/rstpm2
Revision 4f6cced2730ffce02a21c60576beee964f690a74 authored by Mark Clements on 29 May 2018, 12:45:06 UTC, committed by cran-robot on 29 May 2018, 12:45:06 UTC
1 parent 8d14fde
Tip revision: 4f6cced2730ffce02a21c60576beee964f690a74 authored by Mark Clements on 29 May 2018, 12:45:06 UTC
version 1.4.2
version 1.4.2
Tip revision: 4f6cced
runit.Basic.R
.setUp <- function() {
suppressMessages( require(rstpm2) )
data(brcancer)
fit1 <- stpm2(Surv(rectime,censrec==1)~hormon,data=brcancer,df=5)
fit2 <- stpm2(Surv(rectime,censrec==1)~hormon,data=brcancer,
logH.formula=~nsx(log(rectime),df=3,stata=TRUE))
}
test.basic.1 <- function() {
suppressMessages( require(rstpm2) )
data(brcancer)
fit1 <- stpm2(Surv(rectime,censrec==1)~hormon,data=brcancer,df=5)
checkEqualsNumeric(round(coef(fit1)[2],5), -0.36457)
}
test.basic.stata <- function() {
suppressMessages( require(rstpm2) )
data(brcancer)
fit2 <- stpm2(Surv(rectime,censrec==1)~hormon,data=brcancer,
logH.formula=~nsx(log(rectime),df=3,stata=TRUE))
checkEqualsNumeric(round(coef(fit2)[2],5), -0.36144)
}
## .tearDown <- function() {
## rm(fit1,fit2)
## }
Computing file changes ...