EmbraceUncertainty icon indicating copy to clipboard operation
EmbraceUncertainty copied to clipboard

Reorganize preprocessing; use pair as random factor

Open kliegl opened this issue 1 year ago • 4 comments

First draft of slight reorganization of preprocessing Adding square of wrdlen to fixed effects; there is some link to literature First draft of using pair as random factor

kliegl avatar May 19 '24 16:05 kliegl

The way I would calculate age of participant at the time of first test is

function age_at_test(DOB, S1start)
    (byr, bmo, bday) = yearmonthday(DOB)
    (syr, smo, sday) = yearmonthday(S1start)
    ydiff = syr - byr
    ((smo < bmo) || (smo == bmo && sday < bday)) && return ydiff - 1
    return ydiff
end

transform!(elpldtsubj, [:DOB, :S1start] => ByRow(age_at_test) => :age)

dmbates avatar May 20 '24 17:05 dmbates

@kliegl I have a suggested change for computing age_at_event and the :age column for the subjects. Is it okay for me to commit directly to this branch or would you prefer me to create a branch from this branch and commit there?

dmbates avatar May 21 '24 14:05 dmbates

@kliegl You have a note after the discussion of the elpldtitem table on word frequencies, etc. The reason they are not included here is because they are only defined for words. We could determine the value for the word and assign it to both the word and non-word in a pair.

dmbates avatar May 21 '24 14:05 dmbates

@kliegl You have a note after the discussion of the elpldtitem table on word frequencies, etc. The reason they are not included here is because they are only defined for words. We could determine the value for the word and assign it to both the word and non-word in a pair.

Yes, I agree.

kliegl avatar May 21 '24 15:05 kliegl