help > Predictor Variable Format
Showing 1-8 of 8 posts
Display:
Results per page:
Apr 11, 2017  12:04 PM | Devon Shook
Predictor Variable Format
Hello!

I am using your toolbox and have made it, mostly, successfully to the 4th step for permutations. I would like to perform two basic analyses. I have three groups (two patient groups and controls) that I would like to run in an anova for basic differences between groups. How do I format the variable in the matlab workspace to do this? i've tried a cell array (N x 1 cell) with 0 1 or 2 as a dummy variable, but this crashed.

Second, I'd like to run a regression across all subjects with a few symptom variables. A few subjects are missing values, how do I format this variable in the matlab workspace to run these regressions?

thank you,
Devon
Apr 13, 2017  01:04 PM | Jeffrey Spielberg
RE: Predictor Variable Format
Hi Devon,

First, your predictors should be matrices not cell arrays. For a 3 level factor, you'll need two predictors that cover all the relevant variance and then do an F-test across both predictors to get the omnibus. Use whatever predictors best suit your need, as long as the cover all the variance (in my opinion, polynomials are best, as these will cover all the variance and be independent of one another). For example, you could have linear and quadratic predictors (i.e., linear = -1 for 1st level, 0 for 2nd, 1 for 3rd; quadratic = 1 for 1st & 3rd, -2 for 2nd level). Enter both these predictors, set the "Contrasts/F-Tests" drop-down to F-Test, enter 1 in the box, then in the row that appears below, enter 1 for both predictors. This will give you an F-Test across both predictors (i.e., the omnibus test).

For your second question, the toolbox cannot currently handle missing data. So, you either have to drop those participants or give them estimated values (e.g., via hotdeck imputation).
Apr 18, 2017  12:04 PM | Devon Shook
RE: Predictor Variable Format
Hello Dr. Spielberg,

Forgive my ignorance, but I'm still a bit confused about how to tell the toolbox which groups each participant belongs to. I have 124 participants that I ran several metrics on (path length, efficiency, degree, etc.). I'm just not understanding what the toolbox wants as a predictor variable. It would seem to me it would want a vector of 124 values (1,2,3 or ADHD, ASD, TD) in the correct subject order. What am I not understanding?

sorry, and thank you,
Devon
Apr 18, 2017  02:04 PM | Jeffrey Spielberg
RE: Predictor Variable Format
No problem.  Basically, GTG is different from something like SPSS, where you would input one variable with group membership and SPSS will do the coding (e.g., dummy, effect) for you.  With the exception of repeated-measures tests (e.g., paired t-test, r-m ANOVA), GTG is similar to FSL where you need to specify the coded variables yourself.  

So, here's what you need to do for 124 participants, one 3-level factor, and want the omnibus F-Test.  Since 3 doesn't divide evenly into 124, let's assume that you have: ADHD n = 41, ASD n = 41, TD n = 42.  Also, let's assume that your participants are in this order (i.e., 41 ADHD then 41 ASD then 42 TD).  You need to create 2 predictors to model the factor.  There are different ways of coding these, I'm going to use dummy coding in this example:  

The first predictor will model ADHD (with TD as baseline):
P1 = zeros(124,1);
P1(1:41,1) = 1;

Your second predictor will model ASD (with TD baseline):
P2 = zeros(124,1);
P2(42:82,1) = 1;

For the next steps in the GUI, see the attached picture for reference:
1. Select no in the dropdown menu
2. Press this button and select P1 and P2 in the popup
3. Select F-Tests in the dropdown menu
4. Enter 1 in the box
5. Enter 1 in the cells under P1 and P2

This will give you the omnibus test for this factor.  Obviously, you need to do the other parts of the GUI - let me know if you need help with that.  

Also, this page can be useful for understanding how to setup designs: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/F...  An important difference is that FSL has two spreadsheet-like places: one for entering predictors and one for entering contrasts of betas.  GTG has you specify predictors as individual variables from the matlab workspace, and then you can do contrasts of betas in the spreadsheet-like part of the GUI (similar to FSL).

Best,
Jeff
Attachment: GUI.tiff
Apr 28, 2017  10:04 AM | Devon Shook
RE: Predictor Variable Format
Thanks so much, this worked perfectly.

I'm looking at the output for the statistics and trying to get an idea of how to interpret it. If this is my output:

___________________
Design matrix = [ ADHD ASD intercept]

Contrast 1: [1 1 0]
Significant findings for Contrast #1
Characteristic Path Length (thresholded matrices, network-wide, negative weights):
beta stat crit_val p corrected p had NaN had imag had Inf
0.0226 3.5502 3.1432 0.0332 0.9958 0 0 0
Characteristic Path Length (thresholded matrices, network-wide, negative weights, excluding disconnected matrices in AUC):
beta stat crit_val p corrected p had NaN had imag had Inf
0.0226 3.5502 3.1432 0.0332 0.9958 0 0 0
_____________________


For that thresholds do these p-values apply to or is this an average over all the thresholds? I ran the network calculations over the default sets of thresholds using the second option (same densities).
May 9, 2017  01:05 PM | Jeffrey Spielberg
RE: Predictor Variable Format
Hi Devon,

In stage 3, the toolbox computes characteristic path length (CPL), for example, at each threshold, then computes the area-under-the-curve across CPL values to obtain one CPL value for that person.  So, going into the final stage, you are only using one value (per person) representing all the thresholds.  
So, for the output you pasted, your omnibus F-test across ADHD and ASD predictors (with CPL as the DV) produced:

beta = 0.0226
stat = 3.5502
crit_val = 3.1432
p = 0.0332
corrected p = 0.9958
had NaN = 0
had imag = 0
had Inf = 0

The beta isn't really meaningful here (it's really just a placeholder for this kind of test), so ignore that.  stat = the F value associated with your effect.  crit_val = the critical F value for (I assume) 0.05, from the permutation-based distribution.  p = the p-value associated with your F-test.  corrected p = the corrected p-value across all the tests you examined.  had NaN, had imag, and had Inf just indicate whether there were any NaNs, imaginary numbers, or infinities in your DVs (this almost never happens).
May 17, 2017  11:05 AM | Devon Shook
RE: Predictor Variable Format
Wonderful, thank you for all your help.

I want to run correlation analyses as well, but since I'm missing values for some of the participants I thought I'd run it externally (in R or something). I want to extract the right values from the out_propcalc.mat file so if I load that file and look under:

out.AUC_thrmat_graph_meas

I get the following possible output:

cpl_pos_numvalsAUC: [124x1 double]
cpl_pos: [124x1 double]
cpl_pos_numvalsAUC_nodiscon: [124x1 double]
cpl_pos_nodiscon: [124x1 double]


Which one of those is the right value that would correspond to what was used in my group comparisons (Characteristic Path Length (thresholded matrices, network-wide, negative weights):)? I'm assuming one of the first two since I'm not using the no disconnected AUC calculation?

thanks,
Devon
May 17, 2017  11:05 AM | Jeffrey Spielberg
RE: Predictor Variable Format
Yes, cpl_pos_nodiscon is what you want to use.  

FYI, cpl_pos and cpl_pos_nodiscon are the actual property values.  cpl_pos includes both connected and disconnected matrices when calculating the area under the curve, whereas cpl_pos_nodiscon does not.  cpl_pos_numvalsAUC and cpl_pos_numvalsAUC_nodiscon are the the # of values that went into calculating the area under the curve for cpl_pos and cpl_pos_nodiscon, respectively.