Skip to content

Set zval and pval of main model params to NA#285

Merged
pschil merged 3 commits intodevelopmentfrom
feature-summary-set-main-modelparams-NA
Jul 17, 2025
Merged

Set zval and pval of main model params to NA#285
pschil merged 3 commits intodevelopmentfrom
feature-summary-set-main-modelparams-NA

Conversation

@pschil
Copy link
Collaborator

@pschil pschil commented Jul 16, 2025

By definition, they are always >0 and assessing their significance is pointless

As they are by definition always >0 and assessing their significance is pointless
@pschil pschil requested a review from Copilot July 16, 2025 18:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the summary method for fitted CLV models to blank out (set to NA) the z-value and p-value columns for the main model parameters, since their significance is always >0 by definition.

  • Assigns NA_real_ to the "z-val" and "Pr(>|z|)" columns for the original model parameters
  • Adds explanatory comments detailing why NA was chosen over printing "-"
Comments suppressed due to low confidence (2)

R/f_s3generics_clvfitted.R:373

  • The comment refers to "Pvalue" but the column name used is Pr(>|z|). Consider updating the comment to match the actual column label for clarity.
  # Set z-val and Pvalue of the model parameters to NA as they are by definition always > 0 ("significant")

R/f_s3generics_clvfitted.R:379

  • There's no accompanying unit test verifying that summary.clv.fitted() indeed sets these values to NA. Adding a test for this behavior would prevent regressions.
  res$coefficients[object@clv.model@names.original.params.model, c("z-val", "Pr(>|z|)")] <- NA_real_

@pschil pschil merged commit 3d120d2 into development Jul 17, 2025
8 of 9 checks passed
pschil added a commit that referenced this pull request Oct 29, 2025
As went to CRAN:

* Version bump
* Bugfix tests: Usage of apparelDynCov data (#287)
* Set zval and pval of main model params to NA (#285)
* Predict: Rename x.total.spending to x.period.spending (#286)
* Dyncov: Rename predicted.CLV -> predicted.period.CLV (#288)
* Add hessian(): Calculate hessian for fitted models (#289)
* Docu: summary() significance indicators NA (#294)
* clv.fitted.get.LL(): Method required for parameter bootstrap (#293)
* Vignette: Add authors (#291)
* clvdata(): Parameter data.end (#292)
* Add vignettes: PDFs as-is (#295)
* Rcpp: arma::is_finite() -> std::isfinite() (#296)
* Vignettes: Compact during build
* Update vignettes and compact before build
* Prepare release
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