Skip to content

Conversation

@t-pollington
Copy link

@t-pollington t-pollington commented Aug 29, 2021

Following Issue #4 this is a minimal bug correction to prevent a user running bcajack2() if their Y choice leads to B * pct approximately being less than or equal to n aka ncol(Y).

Otherwise lm() will produce some NA entries in ty. as there are insufficient observations (length(ip)) to solve the matrix equation in lm(), considering the number of dimensions of x in lm() is p aka ncol(Y). Happy to explain further, as I'm aware my explanation is spread across this PR and Issue #4.

… Better than just adding `na.rm = TRUE` to s = mean(tt) as it forces user to recheck their data.
…. is already invalid as it's trying to align a vector in a dimensional space smaller than the size of the dataset n. Instead B needs to be increased by doing more bootstrap replics (if possible).
…s run with a size of Y that means B*pct (approx)< n
Imat[Ij, ] seemed to be a mistake as the cols of Imat represent the m groups.
u. <- 2 * t. - s.
gave a warning of different t. & s. lengths when applied to my data. Following "Estimation and Accuracy After Model Selection" by Efron, p995.
@t-pollington
Copy link
Author

Additional commits to bcajack() (note not bcajack2() this time) following 2 possible bugs:

  • Code correction and some refactoring of the loop to get aa and ssj. Imat[Ij, ] seemed to be a mistake as the cols of Imat represent the m groups rather than its rows.

  • Code refactoring. Since the line:
    u. <- 2 * t. - s.
    gave a warning of different t. & s. lengths when applied to my data. Code refactoring followed "Estimation and Accuracy After Model Selection" by Efron, p995 as noted in "The Automatic Construction..." paper.

Copy link
Owner

@bnaras bnaras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went over these changed files and am finding it difficult to distinguish the substantive changes from the non-substantive ones (such as indentation, new lines etc.) Could you please keep the original indentation? Thank you.

@t-pollington
Copy link
Author

Please bear with me. Making a few corrections to my code so could be a few weeks before re-submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants