Skip to content

Commit

Permalink
update for the article revision (1.8.1.14.)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckdckd145 committed Sep 24, 2024
1 parent f953b3b commit c969be5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 110 deletions.
110 changes: 2 additions & 108 deletions article/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,115 +42,9 @@ In conclusion, depending on the researcher's programming experience and the purp

# Features

`Statmanager-kr` was designed to be compatible with the wide range form of `Pandas.DataFrame`.

## User-friendly Features

### Setting the Language
Learn more about the features in the *[official documentation](https://cslee145.notion.site/60cbfcbc90614fe990e02ab8340630cc?v=4991650ae5ce4427a215d1043802f5c0)*. The instructions for running each analysis are also described in *[the manual section of the official documentation](https://cslee145.notion.site/Statmanager-kr-Official-Documentation-74a610c12881402d96dc5d1654f97433#be93db7f4159419fa73eb324d6567793)*. *[Korean versions of the official documenation](https://cslee145.notion.site/fd776d4f9a4f4c9db2cf1bbe60726971?v=3b2b237555fc4cd3a41a8da337d80c01)* are also available.


It is possible to change the language by adjusting the `language` parameter when creating an object of the Stat_Manager class. The supported languages are Korean ("kor") and English ("eng"), and the default is Korean.

```python
sm = Stat_Manager(df, language = 'eng')
```

### Other Methods

Users can search for a specific usage by calling the `.howtouse()` method. It can also change the language with `.set_language()`, or change the dataframe by running `.change_dataframe()`.


## Statistical Test

The implementation of analysis in `Statmanager-kr` can be summarized as follows.

| Objective | Analysis |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Check the normality assumption | Kolmogorov-Smirnov Test, Shapiro-Wilks Test, Z-Skewness & Z-Kurtosis Test |
| Check the homoskedasticity assumption | Levene's Test, F<sub>max</sub> Test |
| Frequency analysis | Chi-Squared Test, Fisher’s Exact Test |
| Check the reliability of the scale | Calculating Cronbach’s Alpha |
| Correlation analysis | Pearson’s r, Spearman’s rho, Kendall’s tau |
| Comparison between groups | Independent Samples T-test, Yuen’s T-test, Welch’s T-test, Mann-whitney U test, Brunner-Munzel Test, One-way ANOVA, Kruskal Wallis Test, One-way ANCOVA |
| Comparison within group | Dependent Samples T-test, Wilcoxon-Signed Rank Test, One-way Repeated Measures ANOVA, Friedman Test, Repeated Measures ANCOVA, |
| Comparison by multiple ways | N-way ANOVA, N-way Mixed Repeated Measures ANOVA |
| Regression analysis | Linear Regression, Logistic Regression |
| etc | Bootstrapping percentile method |

<br>Each analysis method has its own <b>"key"</b> that allows it to be used in the `.progress()` method. The analysis is performed by passing the key for each analysis method to the `method` parameter in the `.progress()` method, the variables to be analyzed to the `vars` parameter, and the group variables to the `group_vars` parameter.

```python
import pandas as pd
from statmanager import Stat_Manager

# 1. Reading the data
df = pd.read_csv(r'testdata.csv', index_col = 'name')

# 2. Creating object of Stat_Manager class
sm = Stat_Manager(df)

# 3. Running: check the difference in weight by sex
sm.progress(method = 'ttest_ind', vars = 'weight', group_vars = 'sex')
```


<br>Also, if a post-hoc test is required, as in the case of a one-way ANOVA (key of one-way ANOVA is `f_oneway`), it can be conducted by simply providing `True` to the `posthoc` parameter.

```python
sm.progress(method = 'f_oneway', vars = 'income', group_vars = 'condition', posthoc = True)
```

### Keys and Related Informations
The method-specific information needed to use the `.progress()` method can be found by using the `.howtouse()` method. The detailed information is summarized in the table below:

| Key | Analysis | Required Parameters | Optional Parameters |
| ------------------ | ----------------------------------- | -------------------- | --------------------------- |
| `kstest` | Kolmogorov-Smirnov Test | `vars` | `group_vars` |
| `shapiro` | Shapiro-Wilks Test | `vars` | `group_vars` |
| `z_normal` | Z-Skewness & Z-Kurtosis test | `vars` | `group_vars` |
| `levene` | Levene Test | `vars`, `group_vars` |
| `fmax` | F<sub>max</sub> Test | `vars`, `group_vars` |
| `chi2_contingency` | Chi-squared Test | `vars` |
| `fisher` | Fisher's Exact Test | `vars` |
| `pearsonr` | Pearson's r | `vars` |
| `spearmanr` | Spearman's rho | `vars` |
| `kendallt` | Kendall's tau | `vars` |
| `ttest_ind` | Independent Samples T-test | `vars`, `group_vars` |
| `ttest_rel` | Dependent Samples T-test | `vars` |
| `ttest_ind_trim` | Yuen's Two Samples T-test | `vars`, `group_vars` |
| `ttest_ind_welch` | Welch's Two Samples T-test | `vars`, `group_vars` |
| `mannwhitneyu` | Mann-Whitney U Test | `vars`, `group_vars` |
| `brunner` | Brunner-Munzel Test | `vars`, `group_vars` |
| `wilcoxon` | Wilcoxon-Signed Rank Test | `vars` |
| `bootstrap` | Boostrap Percentile Method | `vars` | `group_vars` |
| `f_oneway` | One-way ANOVA | `vars`, `group_vars` | `posthoc`, `posthoc_method` |
| `f_oneway_rm` | One-way Repeated Measures ANOVA | `vars` | `posthoc`, `posthoc_method` |
| `kruskal` | Kruskal-Wallis Test | `vars`, `group_vars` | `posthoc`, `posthoc_method` |
| `friedman` | Friedman Test | `vars` | `posthoc`, `posthoc_method` |
| `f_nway` | N-way ANOVA | `vars`, `group_vars` | `posthoc`, `posthoc_method` |
| `f_nway_rm` | N-way Mixed Repeated Measures ANOVA | `vars`, `group_vars` | `posthoc`, `posthoc_method` |
| `linearr` | Linear Regression | `vars` |
| `hier_linearr` | Hierarchical Linear Regression | `vars` |
| `logisticr` | Logistic Regression | `vars` |
| `oneway_ancova` | One-way ANCOVA | `vars`, `group_vars` |
| `rm_ancova` | One-way Repeated Measures ANCOVA | `vars` |
| `cronbach` | Calculating Cronbach's Alpha | `vars` |

Also `Statmanager-kr` provides two post-hoc methods. It can be run by providing the key of the `posthoc_method` parameter as follows:

| Key of `posthoc_method` | Method |
| ----------------------- | --------------------- |
| `bonf` | Bonferroni Correction |
| `tukey` | Tukey HSD |


## Visualization

A figure is automatically generated for the results of the analysis when a `.figure()` is run as a chain method against a `.progress()`.

```python
# Running: check the difference in weight by sex with figure
sm.progress(method = 'ttest_ind', vars = 'weight', group_vars = 'sex').figure()
```

# Acknowledgements

Expand Down
2 changes: 1 addition & 1 deletion statmanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
from .posthoc_functions import *
from .effectsize_functions import *

__version__ = '1.8.1.13'
__version__ = '1.8.1.14'
__all__ = ['Stat_Manager']
2 changes: 1 addition & 1 deletion statmanager/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='statmanager-kr',
version='1.8.1.13',
version='1.8.1.14',
license='MIT',
long_description=description_markdown,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit c969be5

Please sign in to comment.