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

The function computes statistics for log odds ratio of posterior probability.

1 2 | ```
logor.stat(x, fcobj, post.z, cov.param = NULL, cov.post.z = NULL,
cov.logit.z = NULL, all.x = FALSE, drop.ETA1 = FALSE)
``` |

`x` |
an input list of two elements |

`fcobj` |
a |

`post.z` |
a matrix of |

`cov.param` |
a covariance matrix of |

`cov.post.z` |
a covariance list of length equal to number of active
voxels, which is also a return of |

`cov.logit.z` |
a covariance list of length equal to number of active
voxels, which is also a return of |

`all.x` |
all cov matrices for all observations are returned if TRUE, while for only active observations (those of class ids are greater than 1) if FALSE. |

`drop.ETA1` |
if drop the |

For posterior probability, this function compute log odd ratio, cov matrix of log odd ratio, degrees of freedom, and testing statistics.

A list is returned with four elements: `log.or`

, `cov.log.or`

,
`df`

, and `test.stat`

.

Wei-Chen Chen and Ranjan Maitra.

http://maitra.public.iastate.edu/

`post.prob()`

, `cov.param()`

, `cov.post.z()`

,
`cov.logit.z()`

.

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 | ```
library(MixfMRI, quietly = TRUE)
.FC.CT$model.X <- "I"
.FC.CT$CONTROL$debug <- 0
K <- 3
### Fit toy1.
set.seed(1234)
X.gbd <- toy1$X.gbd
X.range <- apply(X.gbd, 2, range)
X.gbd <- t((t(X.gbd) - X.range[1,]) / (X.range[2,] - X.range[1,]))
PV.gbd <- toy1$PV.gbd
fcobj <- fclust(X.gbd, PV.gbd, K = K, min.1st.prop = 0.5)
### Test log odds ratio.
x <- list(X.gbd = X.gbd, PV.gbd = PV.gbd)
post.z <- post.prob(x, fcobj)
lor <- logor.stat(x, fcobj, post.z)
### Check if 95% CE covers log odd ratio = 1.
id <- !is.na(lor$df)
id.cover.0 <- which(lor$test.stat[id] < pchisq(0.95, lor$df[id]))
### Get voxels needed for merging.
id.active <- which(fcobj$class != 1)
id.merge <- id.active[id][id.cover.0]
### Check results.
post.z[id.merge,]
cbind(toy1$X.gbd[id.merge,], toy1$PV.gbd[id.merge])
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.