Hi @billdenney , regarding why we cannot use predcorrect()
before binning()
, the ypc calculation uses median(pred)
by bin
, and in your pcVPC when you specified
predcorrect()
, first,
stratbin
is
NULL
and the ypc calculation then incorrectly uses
mpred
value as
median(pred)
for the entire data. We did have a check for this but it was erroneously commented out when I made changes to allow
binless()
to be used before/after
predcorrect()
.
If using predcorrect()
+ binning()
, we could simply use predcorrect()
to update the tidyvpcobj
with required attributes e.g., predcor
and actually perform the ypc
calculation inside vpcstats()
, this would allow users to specify the functions in whatever order (this is the case for predcorrect()
+ binless()
when calculating l.ypc
). However, the reason we don't do this is because users can actually plot the bins without the vpc statistics (https://certara.github.io/tidyvpc/articles/tidyvpc_cont.html#visualize-bins), and when predcorrect()
is used, the resulting points on the plot are the obs$ypc
values.
I've made some changes to predcorrect()
usage as I described to you, deprecating additional usage of loess.ypc
argument inside binless()
, now binless()
+ predcorrect()
will automatically perform LOESS pcVPC without needing additional redundant argument. I also now ensure binning()
must be performed before predcorrect()
if performing traditional pcVPC. Users can still call binless()
after predcorrect()
for backwards compatibility, but they will now receive a warning. See PR: #42
I'm not too happy about the additional warnings and implementation in general, but this is required to preserve existing behavior. We may decide to overhaul some of this for the next major version release. Happy to hear your thoughts.
Originally posted by @certara-jcraig in #36 (comment)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4