vns

Table of Contents

1 Data files

1.1 Data file columns

1.2 Key to group data file columns

1.2.1 For pre-2016 files

(Includes GroupRegMattext.txt)

  1. sub number

2-6) additional dot indicator vars. (0/1); first one indicates whether a 2nd dot was present, second one a 3rd, etc. 7-11) first row additional dots indicators; first one = "FR2" = at least 2 dots in first row, etc. 12-13) second row additional dots indicators; first one = "SR2" = at least 2 dots in first row, etc.; SR3 only true for one pattern: 111222.

  1. third row additional dots indicator ("TR2"); only true for one pattern: 112233.
  2. symmetry indicator: symmetrical about horiztonal meridian

16-17) "polarity" indictors: top- or bottom-heavy patterns 18-19) monotonicity indicators: first indicates whether #dots/row changes monotonically, second indicates whether #dots in adjacent rows also differs by exactly 1.

  1. Target (1-6;identity of correct response)
  2. Accuracy (0/1)
  3. Response given (1-6)
  4. Confidence response given (1-3)
  5. Reaction time of main response (relative to trial start)
  6. Reaction time of confidence response (relative to start of confidence question screen??)

26-31)False alarm dependent measures (0/1); first ("FA1") indicates when resp. was incorrect and "1", etc.

1.2.2 For 2016 files

(includes DotsData2016.txt)

  1. sub number

2-6) additional dot indicator vars. (0/1); first one indicates whether a 2nd dot was present, second one a 3rd, etc. 7-11) first row additional dots indicators; first one = "FR2" = at least 2 dots in first row, etc. 12-13) second row additional dots indicators; first one = "SR2" = at least 2 dots in first row, etc.; SR3 only true for one pattern: 111222.

  1. third row additional dots indicator ("TR2"); only true for one pattern: 112233.
  2. symmetry indicator: symmetrical about horiztonal meridian

16-17) "polarity" indictors: top- or bottom-heavy patterns 18-19) monotonicity indicators: first indicates whether #dots/row changes monotonically, second indicates whether #dots in adjacent rows also differs by exactly 1. 20-24) additional row indicators; first one indicates that a second row was present ("R2"), etc.

  1. Target (1-6;identity of correct response)
  2. Accuracy (0/1)
  3. Response given (1-6)
  4. Confidence response given (1-3)
  5. Reaction time of main response (relative to trial start)
  6. Reaction time of confidence response (relative to start of confidence question screen??)

31-36)False alarm dependent measures (0/1); first ("FA1") indicates when resp. was incorrect and "1", etc.

1.3 Line from loosenupdots.r

(This summarizes the key to the columns given above:)

junkvar <- c("Sub","N2", "N3","N4", "N5", "N6","FR2","FR3","FR4","FR5","FR6","SR2","SR3","TR2","Symm","Top","Bot","Monot","RegMonot","Num","ACC","RESP","ConfRESP","RT","ConfRT","FA1", "FA2", "FA3", "FA4", "FA5", "FA6");

1.4 Code from loosenupdotsdiego2014.m

(starting from line 915:)

%%%%%%%%%%%%%%%%%%%%%%%%%%
% for any type of, including REGULAR-TYPE, regression
%%%%%%%%%%%%%%%%%%%%%%%%%%

%make matrix of indicator vars for logistic regression
RegXMat = zeros(length(DrawRowsCell),18);

for inc = 1:5

    RegXMat(:,inc) = cellfun(@length,DrawRowsCell) >= inc+1;

end



for inc = 1:length(DrawRowsCell)

   ThisRow = DrawRowsCell{inc};

   uq = unique(ThisRow);
   %make col. vector of frequencies of the unique items
   uqFreqs = sum(repmat(ThisRow,length(uq),1) == repmat(uq',1,length(ThisRow)),2)';

   uqFreqsSort = sort(uqFreqs,2,'descend'); %NOTE: sort in DESCENDING order
   uqFreqsSortBig = uqFreqsSort(uqFreqsSort > 1); %max numel here is only 3, for 112233 pattern
   for jinc = 1:length(uqFreqsSortBig)
       if jinc == 1
           RegXMat(inc,6) = uqFreqsSort(jinc) >= 2; %indicator that the first row has at least 2 elements
           RegXMat(inc,7) = uqFreqsSort(jinc) >= 3;
           RegXMat(inc,8) = uqFreqsSort(jinc) >= 4;
           RegXMat(inc,9) = uqFreqsSort(jinc) >= 5;
           RegXMat(inc,10) = uqFreqsSort(jinc) >= 6;
       elseif jinc == 2
           RegXMat(inc,11) = uqFreqsSort(jinc) >= 2; %indicator that a second row has at least 2 elements
           RegXMat(inc,12) = uqFreqsSort(jinc) >= 3; %only happens once: 111222
       else %jinc == 3, and entry can only be 2
           RegXMat(inc,13) = uqFreqsSort(jinc) >= 2; %only for 112233; indicator that a third row has a least 2 dots
       end

   end

   %In the regression, Either use one indicator for symmetry, or the three below for top/bot
   %heavy and monotonic
   RegXMat(inc,14) = mean(ThisRow') == median(ThisRow'); %symmetrical w.r.t horizontal meridian


    RegXMat(inc,15) = mean(ThisRow') > median(ThisRow'); %Top Heavy pattern
    RegXMat(inc,16) = mean(ThisRow') < median(ThisRow'); %Bot. Heavy pattern

    %test whether rows are arranged with # dots/row in either increasing OR
    %decreasing order (vs. not in MONOTONIC order)
    %note that this test uses UNsorted uqFreqs var, not uqFreqsSort
    %old flawed way:
    %RegXMat(inc,17) = sum(diff(uqFreqs) > 0) & sum(diff(uqFreqs) < 0);


    [lia, locb] = ismember(unique(ThisRow),ThisRow);
    DotsPerRow = [locb(1) diff(locb)];
        if length(unique(ThisRow)) > 2 %more than two rows
            if prod(sign(diff(DotsPerRow))) == 1
                RegXMat(inc,17) = 1;
            else
                RegXMat(inc,17) = 0;
            end
        else %if exactly two rows, always monotonic (one-row patts. removed later)
            RegXMat(inc,17) = 1;
        end


    %check for constant increase/decrease in row length (subset of
    %monotonic)
    if RegXMat(inc,17) %if monotonic
        if length(unique(ThisRow)) > 2 %more than 2 rows
            if prod(abs(diff(DotsPerRow))) %all diffs equal 1 or -1
                RegXMat(inc,18) = 1;
            else
                RegXMat(inc,18) = 0;
            end
        else %two rows (or one, but those removed later)
            if abs(diff(DotsPerRow)) == 1
                RegXMat(inc,18) = 1;
            else
                RegXMat(inc,18) = 0;
            end
        end
    end


   %set all one-row and one-col patterns to zero (they don't count as
   %symm or monotonic here)
   if length(unique(ThisRow)) < 2 %fewer than n rows
       RegXMat(inc,[14 17:18]) = 0; 
   elseif length(unique(ThisRow)) == length(ThisRow) %all same col.
       RegXMat(inc,[14 17:18]) = 0;
   end  



end

CorrectCol = zeros(length(SubData),1);
CorrectCol(CorrectInds) = 1;

%%%%%%%%%%%%%%%%%%%%%%%
% FA dependent measures
%%%%%%%%%%%%%%%%%%%%%%%

FA1 = (TargNums~=1).*(Resps==1);
FA2 = (TargNums~=2).*(Resps==2);
FA3 = (TargNums~=3).*(Resps==3);
FA4 = (TargNums~=4).*(Resps==4);
FA5 = (TargNums~=5).*(Resps==5);
FA6 = (TargNums~=6).*(Resps==6);

%put in a matrix just for convenience
FAColsMat = [FA1 FA2 FA3 FA4 FA5 FA6];


%1st col. is sub. number index, end-11 is correct ans., end-10 is acc, end-9 is
%response number, end-8 is confidence resp number, end-7 is RT, end-6 is
%Conf. RT, last 6 cols are the FA indicators for each numerosity
RegMat = [ones(length(CorrectCol),1)*DF RegXMat TargNums CorrectCol Resps ConfidenceResps RTs ConfidenceRTs FAColsMat];


%set Symmetry variable equal to zero for numerosities 1, 2 and 3
RegMat(TargNums<=3,15) = 0;


%set Monotonicity vars equal to zero for numerosity 1 and 2
RegMat(TargNums<=2,18) = 0; 
RegMat(TargNums<=2,19) = 0; 

%make the more general Monotonicity var mutually exclusive with Symmetry
%otherwise symmetry will be a subset of simple monotonicity
%i.e. say that all rows same length doesn't count as monotonic
RegMat(RegMat(:,15) == 1,18) = 0;

2 R files

2.1 loosenupdots2016.r

Anthony made it today, 2016-03-03.

The first lines were taken wholesale from these files:

loosenupdots.r loosenupdotsmodels.r loosenupdotsrfxmodelsafterstepAICtwice.r

3 MATLAB files

3.1 loosenupdots2016.m

Anthony created this file today, 2016-03-03, originally by renaming loosenupdotsdiego2015.m.

4 Notes

4.1 Ideas for analyses

4.1.1 Make cumulative indicator regressors for number of rows

To mirror the system for number of dots and number of dots per row.

4.1.2 Compare the 6 and 10 dot versions

I guess by using an indicator regressor for one of the studies.

Only use trials with patterns 1-6 for the 10 dot version? There could be problems in doing a clmm if any responses were > 6. But I guess if both studies' responses are going to be explained by the same regressors, then best to include same kinds of trials.

4.1.3 Convex hull regressor.

This will account for the area occupied by the dot patterns.

Express relative to the area of one dot (measure the one dot area as its pixels??).

Can summarize the variability in this measure for different numerosities. I.e., no variance for 1-dot patterns. Also, can measure the variability of this measure for a specific pattern, because any multi-row pattern will have jitter applied to it every time it is drawn on the screen.

Date: 2016-03-04T12:41-0500

Author:

Org version 7.9.3f with Emacs version 24

Validate XHTML 1.0