Description Usage Arguments Details Value Author(s) References See Also Examples
This function generates a posterior density sample for a semiparametric linear mixed effects meta-analysis model using a Polya Tree or a Mixture of Polya Trees prior for the distribution of the random effects.
| 1 2 | 
| formula |   a two-sided linear formula object describing the
fixed-effects part of the model, with the response on the
left of a  | 
| prior |     a list giving the prior information. The list include the following
parameter:  | 
| mcmc |      a list giving the MCMC parameters. The list must include
the following integers:  | 
| state | a list giving the current value of the parameters. This list is used if the current analysis is the continuation of a previous analysis. | 
| status |    a logical variable indicating whether this run is new ( | 
| data | data frame. | 
| na.action | a function that indicates what should happen when the data
contain  | 
This generic function fits a semiparametric linear mixed effects meta-analysis model using a Polya tree prior on the distribution (see, Lavine (1992; 1994) and Hanson (2006) for details about PT) on the distribution of the random effects:
yi ~ N(thetai+ Xi beta, sigma2ei), i=1,…,n
thetai | G ~ G
G | alpha,mu,sigma ~ PT(Pi^{mu,sigma^2},\textit{A})
where the PT prior is centered around a N(mu,sigma2) distribution. 
If frstlprob is equal to TRUE, mu=0 and a median zero PT prior 
is considered (see, Branscum and Hanson, 2008).
To complete the model specification, independent hyperpriors are assumed,
alpha | a0, b0 ~ Gamma(a0,b0)
beta | beta0, Sbeta0 ~ N(beta0,Sbeta0)
mu | mub, Sb ~ N(mub,Sb)
sigma^-2 | tau1, tau2 ~ Gamma(tau1/2,tau2/2)
The precision parameter, α, of the PT prior 
can be considered as random, having a gamma distribution, Gamma(a0,b0), 
or fixed at some particular value. 
The computational implementation of the model is based on the marginalization of
the PT and on the MCMC algorihtms described in Hanson (2006) and 
Jara, Hanson and Lesaffre (2009).
The average effect is sampled using the method of composition described in Jara, Hanson and Lesaffre (2009).
An object of class PTmeta representing the linear
mixed-effects model fit. Generic functions such as print, plot,
summary, and anova have methods to show the results of the fit. 
The results include beta, mu, sigma2, and alpha.
The function PTrandom can be used to extract the posterior mean of the 
random effects.
The list state in the output object contains the current value of the parameters 
necessary to restart the analysis. If you want to specify different starting values 
to run multiple chains set status=TRUE and create the list state based on 
this starting values. In this case the list state must include the following objects: 
| alpha | giving the value of the precision parameter | 
| b | a vector of dimension (nsubjects) giving the value of the random effects for each subject. | 
| beta | giving the value of the fixed effects. | 
| mu | giving the mean of the normal baseline distributions. | 
| sigma2 | giving the variance of the normal baseline distributions. | 
Alejandro Jara <atjara@uc.cl>
Branscum, A. and Hanson, T. (2008) Bayesian nonparametric meta-analysis using Polya tree mixture models. Biometrics, 64: 825-833.
Christensen, R., Hanson, T. Jara, A.. 2008. Parametric Nonparametric Statistics: An Introduction to Mixtures of Finite Polya Trees Models. The American Statistician, 62: 296-306.
Hanson, T. (2006) Inference for Mixtures of Finite Polya Trees. Journal of the American Statistical Association, 101: 1548-1565.
Jara, A., Hanson, T., Lesaffre, E. (2009) Robustifying Generalized Linear Mixed Models using a New Class of Mixtures of Multivariate Polya Trees. Journal of Computational and Graphical Statistics, 18(4): 838-860.
Lavine, M. (1992) Some aspects of Polya tree distributions for statistical modelling. The Annals of Statistics, 20: 1222-11235.
Lavine, M. (1994) More aspects of Polya tree distributions for statistical modelling. The Annals of Statistics, 22: 1161-1176.
PTrandom,
DPMmeta , DPMmeta ,
DPlmm   , DPglmm  , DPolmm ,
DPMlmm  , DPMglmm , DPMolmm
| 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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | ## Not run: 
    ##################################################################    
    # Data on the effectiveness of silver sulfadiazine coating
    # on venous catheters for preventing bacterial colonisation of 
    # the catheter and bloodstream infection. 
    # Veenstra D et al (1998) "Efficacy of Antiseptic Impregnated 
    # Central Venous Catheters in Preventing Nosocomial Infections: 
    # A Meta-analysis" JAMA 281:261-267. 
    #
    # Note that -Inf and Inf have been replaced by NA.
    ##################################################################    
    
      studies <- c("Tennenberg","Maki","vanHeerden",
                    "Hannan","Bach(a)","Bach(b)",
                    "Heard","Collins","Ciresi","Ramsay",
                    "Trazzera","George")    
      logOR <- c(-1.5187189,-0.7136877,-1.3217558,-0.1910552,
                  NA,-2.2005195,-0.5057461,-2.3538784,-0.3643810,
                  -0.5371429,-0.7608058,-2.1400662)
       
      varlogOR <- c(0.4157541,0.2632550,0.6739189,0.3727788,NA,
                    0.7623470,0.2306169,0.7477891,0.3645463,0.2291839,
                    0.3561542,0.5190489)^2
      names(logOR) <- studies
      names(varlogOR) <- studies
      y <- cbind(logOR,varlogOR)
      colnames(y) <- c("logOR","varlogOR")
    # Initial state
      state <- NULL
    # MCMC parameters
      nburn<-20000
      nsave<-10000
      nskip<-20
      ndisplay<-100
      mcmc <- list(nburn=nburn,
                   nsave=nsave,
                   nskip=nskip,
                   ndisplay=ndisplay)
    # Prior information 1: non-median zero PT
      prior1<-list(alpha=1,
                   tau1=20,
                   tau2=10,
                   mub=0,
                   Sb=100,
                   M=4)
    # Prior information 2: median zero PT
      prior2<-list(alpha=1,
                   tau1=20,
                   tau2=10,
                   mub=0,
                   Sb=100,
                   M=4,
                   frstlprob=TRUE,
                   Sbeta0=diag(1000,1),
                   beta0=rep(0,1))
                   
    # Fitting the models
      fit1<-PTmeta(formula=y~1,prior=prior1,mcmc=mcmc,
                   state=state,status=TRUE)
      fit1
      fit2<-PTmeta(formula=y~1,prior=prior2,mcmc=mcmc,
                   state=state,status=TRUE)
      fit2
    # Summary with HPD and Credibility intervals
      summary(fit1)
      summary(fit1,hpd=FALSE)
      summary(fit2)
      summary(fit2,hpd=FALSE)
    # Plot model parameters (to see the plots gradually set ask=TRUE)
      plot(fit1,ask=FALSE)
      plot(fit1,ask=FALSE,nfigr=2,nfigc=2)	
      plot(fit2,ask=FALSE)
      plot(fit2,ask=FALSE,nfigr=2,nfigc=2)	
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.