-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I believe the imputation in CGGPfit doesn't work correctly if the first element of Y is NA.
Can easily be checked by replacing one of the NA entries in the scratch test script (https://github.com/CollinErickson/CGGP/blob/a559b397dfe459d9da29e59a46bfe5936585e406/scratch/main_rsupp_test.R), for example by changing Yb[261,1] = NA to Yb[1,1] = NA.
I had a quick look at the code and the problem seems to lie in here: https://github.com/CollinErickson/CGGP/blob/master/R/CGGP_impute_fs.R#L126. I tried setting the block value of the first value to from NA to 1, but then you run into problems in https://github.com/CollinErickson/CGGP/blob/master/R/CGGP_impute_fs.R#L132:L138.
Is there an elegant way around this, perhaps by somehow intelligently reshuffling the Y's, the design matrix, etc.? Thanks!