# Saving, Loading, and Exporting Results

This page explains how to **export statistics**, **save projects**, **load saved analyses**, and **export images** generated by the app.  
These options are available in **Quick Statistics**, **Custom Statistics**, and the main workspace.

---

![Word export — formatted result with table, chart, and report text](assets/export.png)

## Exporting Statistics

You can export results generated by:

- **Descriptive Statistics**
- **Quick Statistics**
- **Custom Statistics**

All exported files include:

- The full textual output  
- Tables (e.g., ANOVA tables, regression tables, pairwise comparisons)  
- Interpretation text  
- Metadata (date, dataset name, test type)

Supported formats:

- **.docx** — fully formatted Word document (default)  
- **PDF** — *coming soon*  


---

## Exporting Descriptive Statistics

Descriptive Statistics offers two export modes:

### **1. Export All**
Exports descriptive statistics for **all variables** in the dataset.

### **2. Export Selected**
Exports only the variables chosen using:

- The **search bar**, or  
- The **filter filter buttons** (numeric, categorical, text, etc.)

Both options generate a **.docx** file.

--- 

## Exporting Statistical Test Results (Quick & Custom Statistics)

When running **Quick Statistics** or **Custom Statistics**, all generated results appear as separate blocks in the results panel.

Use:

- **Export Stats** — exports **all statistical results currently listed** in the results panel.

### How exporting works

1. Click **Export Stats**.  
2. A **Save As** dialog opens — type a base file name and choose a folder (e.g. `cardiac_study`).  
3. The app appends the current date and saves the file(s) automatically. You do **not** need to type the date or the `.docx` extension.

### File naming

The exported file name follows this pattern:

| Situation | File name |
|---|---|
| All results fit in one file | `cardiac_study_20240531.docx` |
| Results split across multiple files | `cardiac_study_20240531_part_1.docx`, `cardiac_study_20240531_part_2.docx`, … |
| A file with that name already exists | `cardiac_study_20240531_2.docx` (collision-safe) |

### File batching (important!)

If you have many statistical results:

- Each `.docx` file contains **up to 100 statistics**.
- If more than 100 results exist, the exporter automatically creates multiple part files.

This ensures large analysis sessions remain manageable and files don’t grow excessively large.

---

## Exporting Images (Plots)

All visualizations (plots and charts) can be exported as standalone image files directly from the Plot Editor.

Supported formats:

| Format | Best for |
|---|---|
| **PDF** *(default)* | Print, publication, high-quality archiving |
| **SVG** | Vector graphics — scales without loss for presentations or papers |
| **PNG** | General purpose, PowerPoint, web |
| **JPEG** | Photographs, web use where small file size matters |
| **WEBP** | Modern web images with superior compression |

### How to export a plot

1. Open the **Plot Editor** for any result (click **Edit Plot** on a result block).  
2. Click **Export Plot** to expand the export panel.  
3. Set the **scale** (1× – 8×) — higher scale produces larger, sharper images suitable for print.  
4. Click **Export**, choose a filename and format in the Save dialog.  

> 💡 **PDF** and **SVG** are vector formats — they scale perfectly to any size and are preferred for publications.  
> Use **PNG** for PowerPoint and documentation where raster images work fine.

---

## Saving a Project

A project contains:

- Loaded dataset  
- All selected statistics  
- All generated results  
- Test configuration  
- Plots (linked, not embedded)  
- Predictor selections  
- Custom Statistics selections  

Projects are stored in a single file:

**`<name>.stati`**

### How to save a project

1. From the main window, click **Save Project**.  
2. Choose a location and a filename.  
3. A `.stati` project file is created.

---

## Loading a Saved Project

There are **two ways** to load a project:

### Method 1: Open inside the app
1. Open the app.  
2. Click **Load Project** or **Open File** or **Open**.  
3. Select your `.stati` file.  

### Method 2: Double-click the `.stati` file
- On Windows/macOS/Linux, simply double-click the project file:  
  **`<project_name>.stati`**  
- The app will launch automatically and load the full project.

> ✔ This allows you to share project files with others easily.  
> ✔ Double-clicking restores the entire session exactly as it was.
