[R] RV: problems checking a package
Gonzalez Ruiz, Juan Ramon
jrgonzalez at ico.scs.es
Tue Feb 1 16:26:10 CET 2005
Dear R-listers,
I have a very strange problem. I made a package (under Windows and
Linux). The package passed the R CMD Check without problem. Then, I
installed the package and executed a function which calls to a 'dll'
mod<-frailtyPenal(Surv(time,status)~sex+age+cluster(id),
+ n.knots=8,kappa1=10000,data=kidney)
mod
Call:
frailtyPenal(formula = Surv(time, status) ~ sex + age + cluster(id),
data = kidney, n.knots = 8, kappa1 = 10000)
Shared Gamma Frailty model parameter estimates
using a Penalized Likelihood on the hazard function
coef exp(coef) se(coef) se(coef) HIH z p
sex -1.73270 0.177 0.5529 0.5026 -3.134 0.0017
age 0.00812 1.008 0.0125 0.0123 0.651 0.5200
Frailty parameter, Theta: 0.499 (s.e.: 0.266 ) (s.e. HIH: 0.259 )
penalized marginal log-likelihood = -325.64
n= 76
n events= 58
n groups= 38
number of iterations: 20
However, If we try to execute the same function once again we obtain the
following results
mod<-frailtyPenal(Surv(time,status)~sex+age+cluster(id),
+ n.knots=8,kappa1=10000,data=kidney)
mod
Call:
frailtyPenal(formula = Surv(time, status) ~ sex + age + cluster(id),
data = kidney, n.knots = 8, kappa1 = 10000)
Shared Gamma Frailty model parameter estimates
using a Penalized Likelihood on the hazard function
coef exp(coef) se(coef) se(coef) HIH z p
sex -1.74321 0.175 0.5529 0.5026 -3.153 0.0016
age 0.00613 1.006 0.0125 0.0123 0.491 0.6200
Frailty parameter, Theta: 14797011 (s.e.: 1449 ) (s.e. HIH: 1410 )
penalized marginal log-likelihood = 56.63
n= 76
n events= 58
n groups= 38
number of iterations: 351
As you can see, parameters estimates and number of iterations are not
the same. In addition, the second execution takes about 10 seconds and
the first one only 1 or 2. Finnally, if we try to estimate the same
model once again, the PC hunks. I suspect that there is a problem with
Fortran but after proving many changes I do not find it.
Do someone know what it is happening?
Thank you very much for any help in advance.
Best Regards,
Juan
More information about the R-help
mailing list