cin {cin}R Documentation

inference under interference


Test for treatment effects under interference for fMRI time series


cin(X, k=5, type=c("sum", "correlation"), weight=NULL, TR=NULL, interp=FALSE)



Input list of blocks (see reference), where each block could be one subject in one scan session. Each atom in this list is also a list of 3 vectors in the order: fMRI response time series, control stimulus events and treatment stimulus events (both in scans). An example of such input with one block could be list(list(fmri=fmri, stimc=stimc, stimt=stimt)) where fmri, stimc, and stimt are all R numerical vectors.


k-1 controls and 1 treatment are compared. Default 5.


Method to summarize the response times series for each event, weighted summation or correlation with weight. Dealt sum.


Weight used to summarize the time series points after each control or treatment event.


Repetition Time used to generate weight from Canonical HRF (see reference) if weight is not specified.


Whether interpolation of the fMRI time series will take place to produce observations at those event times. If FALSE, the event times will be rounded to nearest scans. Default FALSE.


Performs causal inference test fMRI time series. The test is based on placement statistics (Orban and Wolfe, 1982). The test does not require model assumptions, and can provide valid inference on treatment effects even if there are interference between randomized stimuli.

Current implementation simply consolidates the test statistics from each subjects and each session. More complicated ways of aggregating these effects will be implemented in the future release.


An object with S3 class "cin". You can also use it as a regular R list with the following fields:


Actual test score. The test statistics is Dev.


Expected test score.


Expected variance of test score.


Deviance or z-score.


One-side p-value for Dev.


Xi (Rossi) Luo, Dylan S. Small, Chiang-shan R. Li, and Paul R. Rosenbaum
Maintainer: Xi (Rossi) LUO


Orban, J., and Wolfe, D. (1982). A class of distribution-free two-sample tests based on placements. Journal of the American Statistical Association 77: 666-672.

Luo, X., Small, S., Li, C.R., and Rosenbaum, P. (2012). Inference with interference between units in an fMRI experiment of motor inhibition. Journal of the American Statistical Association. To appear.


## simulation from the null
fmri.ts <- arima.sim(list(order = c(1,1,0), ar = 0.7), n = 1000)
events <- sample(1000, 400)
stimt <- sample(events, 100)
stimc <- setdiff(events, stimt)
cin(list(list(fmri=fmri.ts, stimc=stimc, stimt=stimt)), TR=2)

[Package cin version 0.1 Index]