• 沒有找到結果。

In Gibbs sampler, we usually monitor the convergence by the ”potential scale re-duction factor”(Gelman & Rubin,1992). First, we calculate the variance of the simulation form each chain and average these within-chain variances. Next we take the mixture variance of mixing all chains. Finally, we calculate the square roof of the ratio of average within-chain variances and mixture variance as the potential scale reduction factor which is denoted as ˆR.

R =ˆ

raverage within-chain variances

mixture variance . (23)

Table 1: Interpretation of the Bayes factor.

BF Evidence against M2

< 1 Negative (supports M2) 1-3 Barely worth mentioning 3-20 Positive (supports M1)

20-150 Strong

> 150 Decisive

When the chains have reached convergence, the average of within-chains variances and mixture variance will be identical, so the value of ˆR should be very close to 1. If R is much greater than 1, it implies that the chains have not yet mixed enough. Inˆ this study, we use the commands gelman.diag and gelman.plot in the coda packages in R to monitor the convergence of the Markov Chain Monte Carlo (MCMC) runs.

And we go until ˆR is less than 1.2 for the parameters of interest (Song & Lee, 2001). Once the MCMC has reached convergence and the successive draws from those conditional distributions could be considered as random draws from the joint posterior of all the parameters of interest.

4 Bayes factor

The Bayes factor is a popular Bayesian model selection criterion. For the com-parison between two models M1 and M2 base on the observed data D, the Bayes factor(BF12) is defined as (Gelman, Carlin, Stern & Rubin, 2003)

BF12 = p(D | M1)

p(D | M2), (24)

where p(D | M1) and p(D | M2) denote the probabilities of D under model M1 and M2, respectively. A large BF12 is, the greater the evidence in favor of model M1 against M2. Although the Bayes factor has no direct interpretation as a p-value, to what extend a Bayes factor provide support or evidence for M1 compared to M2, some guidelines have been suggested as reported in Table 1 (Kass & Raftery, 1995).

By the property of conditional probability, we have

BF12= p(D | M1)

2) means the prior odds.

In this study, we are interested in testing the inequality constrained hypothesis of means of the single latent factor among different groups. For example, we use

µ(1), µ(2), and µ(3) to denote the means of group 1, group 2, and group 3 respectively and the inequality hypothesis µ(1) > µ(2) > µ(3) is of interest. Let Hi denote the inequality constrained hypothesis µ(1) > µ(2) > µ(3) and Hc denote the complement of Hi. To test Hi versus Hcusing Bayes factor based on data D, it is straightforward to see that p(Hc| D) = 1 − p(Hi | D) and p(Hc) = 1 − p(Hi). Once the MCMC has reached convergence and we obtain random draws from the joint posterior of all the parameters of interest, we use the proportion of draws which satisfy Hi to estimate p(Hi | D). We denote this proportion as fi which is also called as proportion of fit. On the other hand, we use the proportion of random draws from the joint prior distribution of all the parameters to estimate p(Hi) and this proportion is similarly denoted as ci and called the complexity (Hoijtink, 2013).

Consider the hypothesis µ(1) > µ(2) > µ(3). Because µ(1), µ(2), and µ(3) have the same prior distribution N(µ(g)0 , φ(g)0 ), there are 3! = 6 hypotheses with an equivalent structure. For example, one other equivalent hypothesis is µ(1) < µ(2) < µ(3). Each of these hypotheses has the same complexity from the prior distribution. Moreover, the probability of the equality hypothesis of µ(1) = µ(2) = µ(3) is zero. The union of the six equivalent hypotheses encompasses 100% of the parameter space of µ(1), µ(2), and µ(3), and therefore the complexity of each hypothesis is 16 (Hoijtink, 2013).

As a result, the Bayes factor of Hi versus Hc which we denote as BFic is BFic = fi/(1 − fi)

ci/(1 − ci) = 5fi

(1 − fi). (26)

5 Simulation

We use R (R Core Team, 2015) to generate data from the MCCFA model and use the Bayes factor previously described to test inequality constrained hypotheses of the factor means among different groups. To assess the validity of Bayes factor in testing such constrained hypotheses, we consider two settings of order relations in the means of the latent factor, namely the equality (µ(1) = µ(2) = µ(3)) and inequality (µ(1) > µ(2) > µ(3)). We hope to see whether we can successfully reject all the inequality constrained hypotheses using the Bayes factor approach. On the other hand, we would like to investigate the strength of Bayes factor of testing inequality constrained hypothesis of means under the MCCFA model.

5.1 Simulation setting

5.1.1 parameters for data generation

We consider the setup of three groups (G = 3), and ten ordinal items (p = 10). For the parameters in the MCCFA model, we consider the simplest case with measure-ment invariance across groups such that Λ(g), α(g), and φ(g) are set to be the same

for all groups g = 1, 2, 3. More specifically,

Note that µ(g)is the only parameter that differs across groups under the equality and inequality settings. The µ(g) values used for data generation are reported in Table 2. For each setting, we generate the ordered categorical data under the MCCFA model shown in (1) and (2). Three choices of sample size for each group, ng, under consideration are 250, 500, and 1000. We assume the three groups to have equal sample sizes.

5.1.2 parameters of the prior distributions

We set the parameters of prior distributions of µ(g), Λ(g)(g), and α(g) in (3) to (6) as follows:

• µ(g) ∼ N(µ(g)0 , φ(g)0 ) with µ(g)0 = 0 and φ(g)0 = 10000;

• Λ(g) ∼ MVN(Λ(g)0 , H(g)0 ) with Λ0(g) = 1 and H0(g) = 10I, where 1 and I are respectively the vector of ones and identity matrix;

• φ(g)−1 ∼ Gamma(ρ(g)0 , θ0(g)) with ρ(g)0 = 10 and θ0(g) = 36;

where 1 is a 10 × 1 vector of ones. And we take random sampled values from N(0, 1) to be the starting value of µ(g) for each chain with each setting.

We use the above starting values to generate F(g) and start the Gibbs sampling process with the identifiability constraints of λ(g)1 = 1 and α(g)13 = −0.6 for all g = 1, 2, 3 as suggested in (22).

Table 2: Posterior means and standard deviations (SD) of the factor means.(ng = 250)

ng = 250 chain 1 chain 2 chain 3

Setting Parameter True mean SD mean SD mean SD Rˆ

equality

µ(1) 0 -0.178 0.096 -0.170 0.091 -0.179 0.085 1.10 µ(2) 0 -0.041 0.110 -0.154 0.127 -0.123 0.104 1.01 µ(3) 0 -0.054 0.093 -0.066 0.070 -0.008 0.068 1.12 inequality

µ(1) 0 -0.208 0.089 -0.198 0.095 -0.263 0.079 1.13 µ(2) -0.2 -0.362 0.105 -0.361 0.095 -0.383 0.099 1.01 µ(3) -0.4 -0.457 0.080 -0.467 0.078 -0.426 0.077 1.02

Table 3: Posterior means and standard deviations (SD) of the factor means.(ng = 500)

ng = 500 chain 1 chain 2 chain 3

Setting Parameter True mean SD mean SD mean SD Rˆ

equality

µ(1) 0 0.053 0.064 -0.017 0.088 0.040 0.071 1.01 µ(2) 0 0.006 0.081 0.019 0.076 -0.016 0.074 1.04 µ(3) 0 0.006 0.073 0.015 0.089 -0.007 0.068 1.00 inequality

µ(1) 0 -0.039 0.077 -0.014 0.075 0.013 0.069 1.01 µ(2) -0.2 -0.308 0.064 -0.338 0.078 -0.337 0.079 1.01 µ(3) -0.4 -0.500 0.068 -0.513 0.068 -0.501 0.061 1.03

相關文件