Last chance! 50% off unlimited learning
Sale ends in
test.nb.gf
tests hypotheses for certain trends in Gamma frailty models
test.nb.gf(
dataC,
dataE,
h,
hgrad,
h0 = 0,
trend = c("constant", "exponential", "custom"),
H0 = FALSE,
one.sided = TRUE,
...
)
a matrix or data frame containing count data from the control group. Columns correspond to time points, rows to observations.
a matrix or data frame containing count data from the experiment group. Columns correspond to time points, rows to observations.
hypothesis to be tested. The function must return a single value when evaluated on lambda.
gradient of function h
the value against which h is tested, see 'Details'.
the trend which assumed to be underlying in the data.
indicates if the sandwich estimator is calculated under the null hypothesis or alternative.
indicates if the hypothesis should be tested one- or two-sided
Arguments to be passed to function fit.nb.gf()
.
test.nb.gf
returns effect size, standard error, Z-statistic and p-value attained through standard normal approximation.
the function test.nb.gf
tests for the null hypothesis
If parameter H0 is set to TRUE, the hessian and outer gradient are calculated under the assumption that lambda[2]
h0
if
trend = "constant"
or lambda[3]
h0
if trend = "exponential"
.
Fiocco M, Putter H, Van Houwelingen JC, (2009), A new serially correlated gamma-frailty process for longitudinal count data Biostatistics Vol. 10, No. 2, pp. 245-257.
rnbinom.gf
for information on the Gamma Frailty model, n.nb.gf
for calculating
initial sample size required when performing inference, fit.nb.gf
for calculating
initial parameters required when performing sample size estimation.
# NOT RUN {
#Create data from two groups
random<-get.groups(n=c(100,100), size=c(0.7, 0.7), lambda=c(0.8, 0), rho=c(0.6, 0.6),
tp=7, trend="constant")
#Define hypothesis
h<-function(lambda.eta){
lambda.eta[2]
}
hgrad<-function(lambda.eta){
c(0, 1, 0)
}
test.nb.gf(dataC=random[101:200,], dataE=random[1:100,], h=h, hgrad=hgrad, h0=0,
trend="constant", H0=FALSE)
# }
Run the code above in your browser using DataLab