Closed josherrickson closed 9 months ago
The issue specifically in the summary
call is that since it takes the square root of the diagonals of the covariance matrix, it'll return NaN
if an element is negative, even if it's essentially 0. I don't know what people typically round to and at what stage of computations they round things, but some sort of rounding would help the situation.
For me, the data that's currently committed to the repo gives me NaN
's. What are the steps I need to take to get the version of simdata
that won't give NA's?
The data currently checked in was giving me NA
but not NaN
.
Once I re-ran "data-raw/simdata.R" (without making any changes to the file), and then ran data(simdata)
, I get the version that produces both NA
and NaN
.
Remind me what computer you're using?
Here's my machine precision. What differs on yours?
> .Machine
$double.eps
[1] 2.220446e-16
$double.neg.eps
[1] 1.110223e-16
$double.xmin
[1] 2.225074e-308
$double.xmax
[1] 1.797693e+308
$double.base
[1] 2
$double.digits
[1] 53
$double.rounding
[1] 5
$double.guard
[1] 0
$double.ulp.digits
[1] -52
$double.neg.ulp.digits
[1] -53
$double.exponent
[1] 11
$double.min.exp
[1] -1022
$double.max.exp
[1] 1024
$integer.max
[1] 2147483647
$sizeof.long
[1] 8
$sizeof.longlong
[1] 8
$sizeof.longdouble
[1] 8
$sizeof.pointer
[1] 8
$sizeof.time_t
[1] 8
Address NaN
's by converting any slightly negative vcovDA()
diagonals to 0
^didn't do this; instead made .check_df_moderator_estimates
do a better job of catching SE estimates without sufficient degrees of freedom
Ran into this odd behavior. If I re-run data-raw/simdata.R (without making any modifications), the data changes enough that results are different.
With the currently committed version:
After re-generating the data (it was last touched last year https://github.com/benbhansen-stats/propertee/commit/f2c2a5a21eb36344215495b81c5655950101c258):
The two versions of
simdata
are not identical:I wonder if this is connected to #136. I looked briefly though R's NEWS but didn't see anything obvious related to a change in RNG.
I think this raises two issues:
round
ingsimdata
to avoid this issue entirely. This may require some (many?) tweaks to tests.simdata
is slightly askew of the other such that it's not perfectly singular.I'm happy to startg addressing 1., @jwasserman2 can you look into 2.? I think this is also connected to the most recent discussion on #119 (or vice-versa, #119's issue is related to this.)