You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
For float variables, do not count a value as a difference even if it differs from the value in the replacements file as long as the two values' float representation is the same. Example replacements file for the auto dataset:
make
varname
value
Volvo 260
gear_ratio
2.9800001
E.g., the following code creates this replacements file, then feeds it to readreplace:
clear
set obs 1
gen make ="Volvo 260"gen varname ="gear_ratio"gen double value = 2.9800001
tempfile rf
sa `rf'
sysuse auto, clear
tempfile auto
sa `auto'
assert gear_ratio == float(2.9800001) if make =="Volvo 260"
readreplace using `rf', id(make) var(varname) val(value) use
cf _all using `auto'
There is no actual replacement to gear_ratio, which we confirm with cf, because even though gear_ratio != 2.9800001 in that observation, gear_ratio == float(2.9800001). Yet readreplace displays that there is 1 replacement. This is wrong and should be fixed.
The text was updated successfully, but these errors were encountered:
For
float
variables, do not count a value as a difference even if it differs from the value in the replacements file as long as the two values'float
representation is the same. Example replacements file for the auto dataset:make
Volvo 260
gear_ratio
2.9800001
E.g., the following code creates this replacements file, then feeds it to
readreplace
:There is no actual replacement to
gear_ratio
, which we confirm withcf
, because even thoughgear_ratio != 2.9800001
in that observation,gear_ratio == float(2.9800001)
. Yetreadreplace
displays that there is1
replacement. This is wrong and should be fixed.The text was updated successfully, but these errors were encountered: