Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 112 jackknife #113

Merged
merged 12 commits into from
Nov 17, 2023
Merged

Issue 112 jackknife #113

merged 12 commits into from
Nov 17, 2023

Conversation

mahendra-mariadassou
Copy link
Collaborator

This PR fixes #112 by

  • extracting the computations for the starting point of $B$, $M$ and $S$ and into their own function
  • using it in resampling-based variance estimators

Jackknife and bootstrap variance / sd estimators returned with standard_error(myPLN, "bootstrap") or standard_error(myPLN, "jackknife") are now identical to the ones computed "manally" with repeated call to PLN()

For @jchiquet, you can ignore all commits made before [df51164] / 17th of November, they have been reverted back in further commits.

Copy link
Member

@jchiquet jchiquet left a comment

Choose a reason for hiding this comment

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

minor comment on when/how displaying messages

R/PLNfit-class.R Outdated
@@ -205,13 +209,17 @@ PLNfit <- R6Class(
},

variance_jackknife = function(Y, X, O, w, config = config_default_nlopt) {
cat("\n Computing jackknife variance estimator", sep = "\n")
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a condition to display the message (based on the config argument) ??

Copy link
Collaborator Author

@mahendra-mariadassou mahendra-mariadassou Nov 17, 2023

Choose a reason for hiding this comment

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

Argh, this a leftover from my debugging session. I'm inclined to remove it completely. Do you think we should keep it (if so, I'll add the condition and do the same for bootstrap) ?

Copy link
Member

Choose a reason for hiding this comment

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

removing is perfectly fine.

Copy link
Member

@jchiquet jchiquet left a comment

Choose a reason for hiding this comment

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

Thanks, you should also add an entry into the _pkgdown.yml file to avoid the corresponding action to fail.
For instance, here :
https://github.com/PLN-team/PLNmodels/blob/2657e506675ad26e77df94f9c40f02ae11aa1042/_pkgdown.yml#L110C39-L110C39

(and you could remove one of the redundant 'rPLN' entry by the way...)

@mahendra-mariadassou mahendra-mariadassou marked this pull request as draft November 17, 2023 10:32
@mahendra-mariadassou mahendra-mariadassou marked this pull request as ready for review November 17, 2023 11:44
@mahendra-mariadassou mahendra-mariadassou merged commit fcc9555 into master Nov 17, 2023
7 checks passed
@mahendra-mariadassou mahendra-mariadassou deleted the issue-112-jackknife branch November 17, 2023 11:46
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.

Jackknife estimate of the variance
2 participants