alphasim_-_extended_uses
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | alphasim_-_extended_uses [2010/05/26 04:35] (current) – created jochen | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== alphasim - extended uses ====== | ||
+ | |||
+ | ===== Motivation ===== | ||
+ | Under certain circumstances, | ||
+ | |||
+ | * the maps that are displayed are the result of a conjunction | ||
+ | * the maps are correlations (sometimes more severe if the IV is heavily skewed) | ||
+ | |||
+ | ===== Requirements ===== | ||
+ | |||
+ | ==== Conjunction case ==== | ||
+ | In case of a conjunction analysis, alphasim currently assumes that the terms entering the contrast themselves are valid statistics (their overall false-positive rate behaves as specified) and are independent (e.g. orthogonal contrasts from separate conditions or groups of subjects). | ||
+ | |||
+ | ==== Correlation case ==== | ||
+ | To simulate the outcome of a specific correlation, | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | ===== Function help ===== | ||
+ | < | ||
+ | |||
+ | FORMAT: | ||
+ | |||
+ | Input fields: | ||
+ | |||
+ | ddim data dimension (1x3 integer values) | ||
+ | opts optional settings | ||
+ | .clconn | ||
+ | .conj | ||
+ | .fftconv | ||
+ | .fwhm FWHM kernel sizes (default: [2, 2, 2]) | ||
+ | .mask | ||
+ | .niter | ||
+ | .pbar | ||
+ | .regmaps | ||
+ | .regmodel | ||
+ | .regrank | ||
+ | .srf optional surface (perform surface-based simulation) | ||
+ | .srfsmp | ||
+ | default: [-3, 1, 1]) | ||
+ | .srftrf | ||
+ | derived from bvcoordconv | ||
+ | .thr applied (raw) threshold(s), | ||
+ | |||
+ | Output fields: | ||
+ | |||
+ | at optional output table | ||
+ | |||
+ | Note: other than AFNI's AlphaSim, the data is considered to be | ||
+ | iso-voxel for the default kernel, but that can be altered | ||
+ | accordingly by changing the kernel! | ||
+ | |||
+ | to simulate specific regression results, both options, .regmaps | ||
+ | .regmodel must be set; if only .regmaps is given, random numbers | ||
+ | (using randn) will be generated instead of permuting the predictor</ | ||
+ | |||
+ | ===== Usage examples ===== | ||
+ | ==== Conjunction case ==== | ||
+ | In this example, we assume that the map to be cluster-level thresholded is the result of the conjunction of two independent t-statistics. Further settings | ||
+ | |||
+ | * map is 52-by-50-by-62 voxels in size | ||
+ | * functional resolution is 3mm (iso-voxel) | ||
+ | * smoothing of the underlying maps was 8mm -> kernel in functional resolution is 8/3 voxel! | ||
+ | * we hope for very few maps with large clusters, thus we increase the number of iterations | ||
+ | * alphasim supports settings several threshold (by rescaling the simulated maps) | ||
+ | |||
+ | <code matlab> | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | alphasim([52, | ||
+ | |||
+ | ==== Correlation case ==== | ||
+ | === Only maps are given === | ||
+ | Following the example above, we simply use a different set of options: | ||
+ | |||
+ | * maps are given (see [[glm.RFX_conmaps]] for how to obtain those from a RFX-GLM) | ||
+ | * mask is derived from those maps | ||
+ | |||
+ | <code matlab> | ||
+ | asim_mask = any(asim_cons ~= 0, 4); % this masks voxels for which all subjects have a 0-value | ||
+ | asim_options = struct( ... | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | alphasim(size(asim_mask), | ||
+ | |||
+ | This will simulate a normally distributed regressor. | ||
+ | |||
+ | === Maps and regressor are given === | ||
+ | In addition to the above example, a regressor can be set in asim_options, | ||
+ | |||
+ | <code matlab> | ||
+ | [0.25; 0.61; 1.24; -0.07; 0.91; 1.41; 3.11; -0.12; 0.77; 0.49; 0.8; 0.04]; | ||
+ | alphasim(size(asim_mask), | ||
+ | |||
+ | ===== Sample output ===== | ||
+ | In the conjunction case, this is the sample output (using only 100 iterations, taking 94 seconds on my MacBook Pro...): | ||
+ | |||
+ | < | ||
+ | ------------------------------------------------------------ | ||
+ | Cl Size Frequency | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 10 207 0.9601725 | ||
+ | 11 137 0.9688610 | ||
+ | 12 105 0.9755200 | ||
+ | 13 | ||
+ | 14 | ||
+ | 15 | ||
+ | 16 | ||
+ | 17 | ||
+ | 18 | ||
+ | 19 | ||
+ | 20 | ||
+ | 21 | ||
+ | 22 8 0.9972730 | ||
+ | 23 7 0.9977169 | ||
+ | 24 4 0.9979706 | ||
+ | 25 6 0.9983511 | ||
+ | 26 8 0.9988584 | ||
+ | 27 2 0.9989853 | ||
+ | 28 4 0.9992390 | ||
+ | 29 1 0.9993024 | ||
+ | 30 1 0.9993658 | ||
+ | 32 1 0.9994292 | ||
+ | 33 3 0.9996195 | ||
+ | 34 1 0.9996829 | ||
+ | 35 1 0.9997463 | ||
+ | 36 2 0.9998732 | ||
+ | 37 1 0.9999366 | ||
+ | 40 1 1.0000000 | ||
+ | |||
+ | |||
+ | Uncorrected threshold: p< | ||
+ | ------------------------------------------------------------ | ||
+ | Cl Size Frequency | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 10 | ||
+ | 11 | ||
+ | 12 | ||
+ | 13 5 0.9962710 | ||
+ | 14 8 0.9979283 | ||
+ | 16 4 0.9987570 | ||
+ | 17 2 0.9991713 | ||
+ | 18 3 0.9997928 | ||
+ | 19 1 1.0000000 | ||
+ | |||
+ | |||
+ | Uncorrected threshold: p< | ||
+ | ------------------------------------------------------------ | ||
+ | Cl Size Frequency | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 10 4 0.9971360 | ||
+ | 11 2 0.9980907 | ||
+ | 13 3 0.9995227 | ||
+ | 14 1 1.0000000 | ||
+ | |||
+ | |||
+ | Uncorrected threshold: p< | ||
+ | ------------------------------------------------------------ | ||
+ | Cl Size Frequency | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | Uncorrected threshold: p< | ||
+ | ------------------------------------------------------------ | ||
+ | Cl Size Frequency | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | Uncorrected threshold: p< | ||
+ | ------------------------------------------------------------ | ||
+ | Cl Size Frequency | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
alphasim_-_extended_uses.txt · Last modified: 2010/05/26 04:35 by jochen