Decimal separator inconsistency


Author
Message
LTK
LTK
New Member (44 reputation)New Member (44 reputation)New Member (44 reputation)New Member (44 reputation)New Member (44 reputation)New Member (44 reputation)New Member (44 reputation)New Member (44 reputation)New Member (44 reputation)
Group: Forum Members
Posts: 11, Visits: 61
I'm running a script in which I compute some variables in Inquisit for analysis, and some participants have completed my experiment online, but I'm seeing a few strange things.

The first is what looks like floating point errors: the variables I compute (which are mainly averages of whole numbers) have values like 0.6500000000000000222 coming out of 13 divided by 20. Annoying, but nothing I can't solve by rounding them off, though it would be nice if I could tell Inquisit to use only 2 decimals for all of my 34 analysis variables.

The second is that the decimal separators are sometimes periods and sometimes commas. I'm in the Netherlands, which uses comma separators, but my non-European participants seem to have their data entered with period separators. Does Inquisit record data using the settings of the computer it's running on, rather than the computer that created the script? This is a lot harder to fix, and I don't know how I can get the data to be saved with only comma separators.

I attached the data file in question.

Attachments
MergedData.iqdat (8 views, 7.00 KB)
Dave
Dave
Supreme Being (974K reputation)Supreme Being (974K reputation)Supreme Being (974K reputation)Supreme Being (974K reputation)Supreme Being (974K reputation)Supreme Being (974K reputation)Supreme Being (974K reputation)Supreme Being (974K reputation)Supreme Being (974K reputation)
Group: Administrators
Posts: 11K, Visits: 76K
LTK - 11/12/2021
I'm running a script in which I compute some variables in Inquisit for analysis, and some participants have completed my experiment online, but I'm seeing a few strange things.

The first is what looks like floating point errors: the variables I compute (which are mainly averages of whole numbers) have values like 0.6500000000000000222 coming out of 13 divided by 20. Annoying, but nothing I can't solve by rounding them off, though it would be nice if I could tell Inquisit to use only 2 decimals for all of my 34 analysis variables.

The second is that the decimal separators are sometimes periods and sometimes commas. I'm in the Netherlands, which uses comma separators, but my non-European participants seem to have their data entered with period separators. Does Inquisit record data using the settings of the computer it's running on, rather than the computer that created the script? This is a lot harder to fix, and I don't know how I can get the data to be saved with only comma separators.

I attached the data file in question.

>  The first is what looks like floating point errors: the variables I compute (which are mainly averages of whole numbers) have values like 0.6500000000000000222 coming out of 13 divided by 20. Annoying, but nothing I can't solve by rounding them off, though it would be nice if I could tell Inquisit to use only 2 decimals for all of my 34 analysis variables.

You could have use the format() function.
https://www.millisecond.com/support/docs/v6/html/language/expressions/functions.htm
https://www.millisecond.com/support/docs/v6/html/language/functions/format.htm

> Does Inquisit record data using the settings of the computer it's running on, rather than the computer that created the script.

Yes.

> This is a lot harder to fix, and I don't know how I can get the data to be saved with only comma separators.

This strikes me as a simple search and replace operation.
Attachments
MergedData.iqdat (7 views, 7.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search