predict.HDPMdensity: Predictive Information for the Dependent Random Probability...

Description Usage Arguments Details Author(s) References See Also Examples

Description

Plot the probability measures arising from a HDPM of normals model. Support provided by the NIH/NCI R01CA75981 grant.

Usage

1
2
## S3 method for class 'HDPMdensity'
predict(object,i,r,ask=TRUE,nfigr=2,nfigc=2, ...)

Arguments

object

HDPMdensity fitted model object.

i

study indicator.

r

indicator for including (0) or not (1) the common measure.

ask

logical variable indicating whether the plots must be displayed sequentially or not.

nfigr

number of rows in the figure.

nfigc

number of columns in the figure.

...

further arguments to be passed.

Details

Must run HDPMdensity first to generate posterior simulations.

Author(s)

Alejandro Jara <atjara@uc.cl>

Peter Mueller <pmueller@mdanderson.org>

References

Mueller, P., Quintana, F. and Rosner, G. (2004). A Method for Combining Inference over Related Nonparametric Bayesian Models. Journal of the Royal Statistical Society, Series B, 66: 735-749.

See Also

HDPMdensity

Examples

 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
## Not run: 

    # Data
      data(calgb)
      attach(calgb)
      y <- cbind(Z1,Z2,Z3,T1,T2,B0,B1)

    # Prior information
      prior <- list(pe1=0.1,
                    pe0=0.1,
                    ae=1,
                    be=1,
                    a0=rep(1,3),
                    b0=rep(1,3),
                    nu=9,
                    tinv=0.25*var(y),
 		    m0=apply(y,2,mean),
                    S0=var(y),
 		    nub=9,
                    tbinv=var(y))		


    # Initial state
      state <- NULL

    # MCMC parameters

      mcmc <- list(nburn=5000,
                   nsave=5000,
                   nskip=3,
                   ndisplay=100)

    # Fitting the model
      fit1 <- HDPMdensity(y=y,
                          study=study,
                          prior=prior,
                          mcmc=mcmc,
                          state=state,
                          status=TRUE)

    # Posterior inference
      fit1
      summary(fi1)
       
    # Plot the parameters
    # (to see the plots gradually set ask=TRUE)
      plot(fit1,ask=FALSE)

    # Plot the a specific parameters 
    # (to see the plots gradually set ask=TRUE)
      plot(fit1,ask=FALSE,param="eps",nfigr=1,nfigc=2)

   # Plot the measure for each study
      predict(fit1,i=1,r=1) # study 1
      predict(fit1,i=2,r=1) # study 2

    # Plot the idiosyncratic measure for each study
      predict(fit1,i=1,r=0) # study 1
      predict(fit1,i=2,r=0) # study 2

    # Plot the common measure
      predict(fit1,i=0)

## End(Not run)

DPpackage documentation built on May 1, 2019, 10:23 p.m.