cin {cin}  R Documentation 
Test for treatment effects under interference for fMRI time series
cin(X, k=5, type=c("sum", "correlation"), weight=NULL, TR=NULL, interp=FALSE)
X 
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 
k 

type 
Method to summarize the response times series for each
event, weighted summation or correlation with 
weight 
Weight used to summarize the time series points after each control or treatment event. 
TR 
Repetition Time used to generate 
interp 
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:
Score 
Actual test score. The test statistics is

Exp 
Expected test score. 
Var 
Expected variance of test score. 
Dev 
Deviance or zscore. 
p.value 
Oneside pvalue for 
Xi (Rossi) Luo, Dylan S. Small, Chiangshan R. Li, and Paul R. Rosenbaum
Maintainer: Xi (Rossi) LUO xi.rossi.luo@gmail.com
Orban, J., and Wolfe, D. (1982). A class of distributionfree twosample tests based on placements. Journal of the American Statistical Association 77: 666672.
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)