Description Usage Arguments Details Value Note References See Also Examples
Fits the nonhomogeneous Poisson process model to panel count data using EM algorithm.
1 |
DATA |
use specified data structure. |
order |
the order of basis functions. |
placement |
logical, if TRUE knots are placed evenly across the observed intervals based on the input data set; if FALSE knots should be specified by the user. see myknots. |
nknot |
the number of knots to be used. |
myknots |
a sequence of increasing points whose length is nknot. |
binit |
initial estimate of regression coefficients. |
ginit |
initial estimate of spline coefficients whose length should be (order+nknot-2) or (order+length(myknots)-2). |
t.seq |
an increasing sequence of points at which the baseline mean function is evaluated. |
tol |
the convergence criterion of the EM algorithm. |
The above function fits the non-homogeneous Poisson process model to panel count data via EM algorithm.
beta |
estimates of regression coefficients. |
gamma |
estimates of spline coefficients. |
var.b |
the variance covariance matrix of regression coefficients. |
Hess |
Hessian matrix. |
knots |
the knots used in the analysis. |
bmf |
estimated baseline mean function evaluated at the points t.seq; use pmf to plot the baseline mean fuction. |
AIC |
the Akaike information criterion. |
BIC |
the Bayesian information/Schwarz criterion. |
flag |
the indicator whether the Hessian matrix is non-singular. When flag="TRUE",the variance estimate may not be accurate. |
The non-homogeneous Poisson process model involves no Gamma frailty.
Yao, B., Wang, L., and He, X. (2014+). Semiparametric regression analysis of panel count data allowing for within-subject correlation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | ##Simulated Data
n=13; #number of subjects
##generate the number of observations for each subject
k=rpois(n,6)+1; K=max(k);
##generate random time gaps for each subject
y=matrix(,n,K);
for (i in 1:n){y[i,1:k[i]]=rexp(k[i],1)}
##get observation time points for each subject
t=matrix(,n,K);
for (i in 1:n){
for (j in 2:K){
t[i,1] = y[i,1]
t[i,j] = y[i,j]+t[i,j-1]
}
}
##covariate x1 and x2 generated from Normal(0,0.5^2) and Bernoulli(0.5) respectively
x1=rnorm(n,0,0.5); x2=rbinom(n,1,0.5); x=cbind(x1,x2)
##true regression parameters and frailty variance parameter
beta1=1; beta2=-1; nu=0.5;
parms=c(beta1,beta2)
phi=rgamma(n,nu,nu)
##true baseline mean function
mu=function(t){2*t^(0.5)}
##get the number of events between time intervals
z=matrix(,n,K);
xparms<-c();for (s in 1:nrow(x)){xparms[s]<-sum(x[s,]*parms)}
for (i in 1:n){
z[i,1]<-rpois(1,mu(t[i,1])*exp(xparms[i])*phi[i])
if (k[i]>1){
z[i,2:k[i]]<-rpois(k[i]-1,(mu(t[i,2:k[i]])-mu(t[i,1:(k[i]-1)]))*exp(xparms[i])*phi[i])
}
}
TestD<-list(t=t, x=x, z=z, k=k, K=K)
fit<-PCDReg.nf(DATA = TestD, order = 1, placement = TRUE, nknot=3,
myknots, binit = c(-0.5,0.5) , ginit = seq(0.1,2),
t.seq = seq(0,15,0.2), tol=10^(-3))
|
There were 26 warnings (use warnings() to see them)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.