Missing data can quietly ruin a statistical analysis if you don't handle it correctly. In jamovi, missing values often appear as blank cells or are inherited as NaN (Not a Number) from underlying R computations. When unaddressed, these blank or null entries distort descriptive statistics, crash regression models, and introduce hidden bias into research findings.
This guide walks through how jamovi processes missing values, how to define custom missing codes, and how to fix errors caused by NaN entries during data transformations and computations.
Understanding How Jamovi Detects Missing Data
By default, jamovi treats completely empty cells in a spreadsheet row as missing data. When you run an analysis like an independent samples t-test or a correlation, jamovi automatically applies listwise deletion (complete-case analysis), dropping any row that contains a blank cell for the variables involved.
However, raw data imports often encode missing entries using numerical placeholders rather than blank cells. Common placeholders include -99, 999, or 9999. If your dataset uses these codes, jamovi will treat them as real numerical values unless you explicitly designate them as missing. This oversight inflates means, skews standard deviations, and wrecks variance estimates.
Setting Missing Value Rules
To tell jamovi to treat specific numbers as missing, follow these steps in the spreadsheet editor:
- Double-click the column header of the variable to open the variable editor.
- Click on the Missing values field.
- Click Add Missing Value.
- Specify the condition, such as equality to a specific numeric code (e.g.,
== 9999).
Once defined, jamovi masks those values across all statistical modules, ensuring they don't corrupt your output tables.
Where NaN Values Originate
When you use jamovi's computed variables or transformations, you might encounter NaN or blank results in rows where you expected numbers. Because jamovi is built on top of R, it borrows R's handling of undefined mathematical operations.
For example, trying to divide a number by zero, calculating the square root of a negative value, or performing arithmetic operations where one operand is blank will yield a NaN or missing result. If you add two variables together using a row-by-row formula like Var1 + Var2, and Var2 is missing for participant four, the resulting sum for that row will also turn up blank.
Cleaning and Imputing Missing Data
Depending on your sample size and research design, deleting every row with a missing value can severely reduce statistical power. Jamovi provides alternative ways to manage incomplete records through computed transformations and filters.
Using Conditional Logic to Handle Nulls
If you want to substitute missing entries with a specific placeholder or baseline value during a data transformation, you can write conditional statements. Open the Data tab, click Transform, and set up rules using conditional operators:
- Use double equals signs (
==) for exact matches in conditional expressions. - Use inequality operators (
!=) to filter out unwanted codes. - Wrap text strings in single quotes so jamovi recognizes them correctly during recoding.
If you need to exclude specific participants temporarily without permanently deleting their rows from the spreadsheet, use the Filters button on the Data ribbon to apply row-exclusion rules. For instance, a filter expression like Row() != 5 or a conditional filter based on a variable threshold hides specific rows from active analyses while keeping the raw data intact.
Common Mistakes to Avoid
Data analysts frequently run into avoidable pitfalls when cleaning datasets in jamovi:
- Confusing valid codes with missing codes: Choosing a missing value code that falls inside your valid measurement scale—such as assigning
-1as a missing code on a scale measuring frequency from0to7—will accidentally code valid zero or low responses as missing. - Ignoring sample size drops: Relying entirely on default listwise deletion without checking sample sizes across models can result in analyses running on drastically different subsets of participants.
- Forgetting quotation marks in text transformations: Omitting quotes when recoding categorical missing flags will cause syntax evaluation errors in jamovi's underlying R engine.
Frequently Asked Questions
Does jamovi support automated multiple imputation?
Jamovi's core interface focuses on traditional listwise deletion and pairwise options within specific analyses. For advanced imputation techniques like multiple imputation via chained equations, analysts typically export the dataset to R or use specialized Jamovi modules available through the library.
Why are my computed scores returning blank cells?
If a computed variable relies on a formula involving multiple columns, any single missing cell within that row's equation will propagate a missing value to the output. Check whether your formula components contain unhandled blanks or NaN entries.
How do I revert a missing value rule I added by mistake?
Open the variable editor by double-clicking the column header, navigate to the missing values section, and remove the specific rule condition you previously set. The original data values will immediately reappear in the spreadsheet view.
Can I filter out rows containing NaN values automatically?
Yes. You can build a filter expression using variable evaluation checks to exclude rows where essential variables return null or missing statuses, keeping your working sample clean for specific regression models.