Hello,
I want to generate data set from Cox PH model with gamma frailty effects.
theta(parameter for frailty distribution)=2
beta=1.5
n=300
cluster size=30
number of clusters=10
I think I should first generate u from Gamma(Theta,theta) and then using
this theta I could not decide how I should generate the survival times?
Is there any package for this? or any document you could suggest?
Any help is appreciated.
Many thanks in advance.
Aysun
> Anyone know how to get p-values for the t-values from the coefficients
> produced in vglm?
> Attached is the code and output ? see comment added to output to show
> where I need p-values
>
>
> + print(paste("********** Using VGAM function gamma2
**********"))
> + modl2<-
> vglm(MidPoint~Count,gamma2,data=modl.subset,trace=TRUE,crit="c")
> + print(coef(modl2,matrix=TRUE))
> + print(summary(modl2))
>
>
> [1] "********** Using VGAM function gamma2 **********"
> VGLM linear loop 1 : coefficients > 0.408464609241,
3.255887520104, -0.000220585671
> VGLM linear loop 2 : coefficients > 2.34723239e-01,
1.28969691e+00, -4.52393778e-05
> VGLM linear loop 3 : coefficients > 2.19500481e-01,
1.92534895e+00, -3.02160949e-05
> VGLM linear loop 4 : coefficients > 2.19383151e-01,
2.26845910e+00, -3.00838664e-05
> VGLM linear loop 5 : coefficients > 2.19383045e-01,
2.34645688e+00, -3.00836087e-05
> VGLM linear loop 6 : coefficients > 2.19383045e-01,
2.34977070e+00, -3.00836082e-05
> VGLM linear loop 7 : coefficients > 2.19383045e-01,
2.34977637e+00, -3.00836082e-05
> VGLM linear loop 8 : coefficients > 2.19383045e-01,
2.34977637e+00, -3.00836082e-05
> log(mu) log(shape)
> (Intercept) 2.193830e-01 2.349776
> Count -3.008361e-05 0.000000
>
> Call:
> vglm(formula = MidPoint ~ Count, family = gamma2, data = modl.subset,
> trace = TRUE, crit = "c")
>
> Pearson Residuals:
> Min 1Q Median 3Q Max
> log(mu) -1.7037 -0.82997 0.072275 0.78520 1.72834
> log(shape) -2.5152 -0.32448 0.254698 0.58772 0.70678
>
>
> ######### NEED P-VALUES HERE #########
>
> Coefficients:
> Value Std. Error t value
> (Intercept):1 2.1938e-01 5.2679e-02 4.16455
> (Intercept):2 2.3498e+00 1.7541e-01 13.39574
> Count -3.0084e-05 8.9484e-05 -0.33619
>
> Number of linear predictors: 2
>
> Names of linear predictors: log(mu), log(shape)
>
> Dispersion Parameter for gamma2 family: 1
>
> Log-likelihood: -26.39268 on 123 degrees of freedom
>
> Number of Iterations: 8
>
>
> Steven Matthew Anderson
>
> Anderson Research, LLC
> Statistical Programming and Analysis
> SAS (R) Certified Professional
> AdAstra69 at mac.com
>
> Ad Astra per Aspera
>
> ???????
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>