├── .gitignore
├── ANOVA_in_R_Repeated_Measures_Example.ipynb
├── Descriptive_Statistics_in_Python.csv
├── Jupyter_extension_rmagic_rpy2_tutorial.ipynb
├── MANOVA_Test_in_Python_Statsmodels_Example.ipynb
├── NamesAndAges.xlsx
├── Pandas Scatter Plot Tutorial.ipynb
├── Pandas_Dataframe_Tutorial_Example_Code.ipynb
├── Pandas_read_html_example_code.ipynb
├── Python Pandas CSV.ipynb
├── Python_ANOVA
├── One_Way_Python_ANOVA.ipynb
├── Python repeated measures ANOVA.ipynb
├── Python_ANOVA_Factorial_Using_Statsmodels.ipynb
├── Repeated measures ANOVA using R and afex.ipynb
├── Two_Way_ANOVA_in_Python_Tutorial.ipynb
├── Two_Way_ANOVA_in_Python_using_Pingouin_Stats.ipynb
├── pingouin-code-ANOVA-in-Python.ipynb
├── rmAOV1way.csv
└── rmAOV2way.csv
├── README.md
├── R_Notebooks
├── concat_columns_in_R.ipynb
├── reading_and_writing_stata_files_in_R.ipynb
├── reverse_coding_in_R.ipynb
└── scatter_plot_in_R_tutorial.ipynb
├── Raincloud_Plots_in_Python.ipynb
├── Reading Multiple Spreadsheets using Pandas.ipynb
├── Rename_Columns_in_Pandas_Dataframe.ipynb
├── Rpy2 and R plots in a Jupyter Notebook!.ipynb
├── Scatterplot_example.ipynb
├── Seaborn_Scatterplot_Tutorial_Example_Code.ipynb
├── Selecting Specific Rows & Columns of Pandas Dataframe Objects.ipynb
├── SimData
├── DF_NA_Janitor.csv
├── Data_to_Transform.csv
├── FifthDayData.csv
├── FifthDayData.dta
├── FirstDayData.csv
├── FirstDayData.dta
├── FirstDayData.sav
├── FourthDayData.csv
├── MissingData.csv
├── NewFifthDayData.dta
├── SecondDayData.csv
├── SixthDayData.csv
├── ThirdDayData.csv
├── add_column.xlsx
├── add_column2.xlsx
├── correlationMatrixPython.csv
├── example_concat.dta
├── example_concat.xlsx
├── example_concat1.xlsx
├── example_concat3.xlsx
├── example_sheets.xlsx
├── example_sheets1.xlsx
├── example_sheets2.xlsx
├── exfample_concat.sav
├── mannwu.csv
├── paired_samples_data.csv
├── play_data.csv
├── play_data.xlsx
├── play_data2.dta
├── python_absolute_value.csv
├── skiprow.csv
├── survey_1.sav
└── survey_2.sav
├── YT
├── Pandas_Groupby_Tutorial_Part_I.ipynb
└── paired_samples_t-test_python_scipy_pingouin.ipynb
├── convert_html_jupyter_notebook_tutorial.ipynb
├── convert_numpy_float_array_to_integer_array_Python.ipynb
├── correlation_matrix_in_python.ipynb
├── descriptive_statistics_example_code.ipynb
├── descriptive_stats_using_numpy_python.ipynb
├── example_sheets2.xlsx
├── flanks.csv
├── getting_the_highest_value_from_dictionary.ipynb
├── how-to-get-column-names-Pandas-python.ipynb
├── how-to-make-histogram-in-pandas-python.ipynb
├── how_to_convert_a_dictionary_to_pandas_dataframe.ipynb
├── how_to_read_SPSS_sav_files_in_Python.ipynb
├── how_to_read_xlsx_files_in_Python_using_pylightxl.ipynb
├── how_to_use_pandas_groupby_method.ipynb
├── json_in_python_and_pandas.ipynb
├── kde-cdf-delta-caf-plots.ipynb
├── mann_whitney_u_test_Python.ipynb
├── multiple_Sheets.xlsx
├── names_ages.xlsx
├── newfilename.xlsx
├── pairplot.eps
├── pandas_dataframe_tutorial.ipynb
├── pandas_get_dummies_how_to_create_dummy_variables.ipynb
├── pandas_groupby_tutorial.ipynb
├── percentage_rank_per_disciplin.csv
├── pingouin_repeated_measures_anova_python.ipynb
├── pyjanitor_data_cleaning_adding_columns_removing_columns_pandas.ipynb
├── pyreadstat_and_pandas_read_stata_tutorial_code.ipynb
├── python_descriptive_statistics_sample.ipynb
├── reading_STATA_files_using_Pandas.ipynb
├── reverse_pandas_dataframe.ipynb
├── rpy2 tutorial example code.ipynb
├── scatter_matrix.ipynb
├── scatter_plot_in_Python_with_ggplot.ipynb
├── seaborn_line_graphs_guide_code_examples.ipynb
└── two_sample_t-test_Python.ipynb
/.gitignore:
--------------------------------------------------------------------------------
1 | .ipynb_checkpoints
2 |
--------------------------------------------------------------------------------
/Descriptive_Statistics_in_Python.csv:
--------------------------------------------------------------------------------
1 | iv1,iv2,median,std,mean,trimmed_mean
2 | noise,1,962.4748045284091,142.87145681209597,979.242534213332,977.6071917797902
3 | noise,2,1180.3526031136053,112.85542102711946,1173.7510775386322,1175.6839204283096
4 | noise,3,1293.4332963142926,128.05319406285818,1298.5035528918638,1293.735855849951
5 | quiet,1,477.3728301826787,109.92102618993482,496.2728667850206,500.21628409947743
6 | quiet,2,588.6391119296707,75.52068470037284,586.9715252257087,581.2882267649697
7 | quiet,3,791.8927469418701,132.92534730335424,819.0129315952987,814.8878002369454
8 |
--------------------------------------------------------------------------------
/Jupyter_extension_rmagic_rpy2_tutorial.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "## Display R Plots in Python: the rmagic Method \n",
8 | "\n",
9 | "In this Jupyter Notebook you will find an rpy2 code example in which we use the Python package rpy2 to create R plots. We use the r-packages 'graphics' and 'ggplot2' and display them here in this Jupyter Notebook.\n",
10 | "\n",
11 | "This is an alternative method, compared to the one used in the [YouTube Video about using Rpy2 and plotting in Jupyter notebooks](https://youtu.be/RK-n78ZOXUg)"
12 | ]
13 | },
14 | {
15 | "cell_type": "code",
16 | "execution_count": 1,
17 | "metadata": {},
18 | "outputs": [],
19 | "source": [
20 | "%load_ext rpy2.ipython\n",
21 | "%Rdevice png"
22 | ]
23 | },
24 | {
25 | "cell_type": "code",
26 | "execution_count": 2,
27 | "metadata": {},
28 | "outputs": [
29 | {
30 | "data": {
31 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAMAAABKCk6nAAAAYFBMVEUAAAAAADoAAGYAOjoAOpAAZrY6AAA6AGY6OpA6ZrY6kNtmAABmADpmAGZmtv+QOgCQOjqQOmaQ29uQ2/+2ZgC2//++vr7bkDrb25Db/7bb////tmb/25D//7b//9v///8zek6xAAAIt0lEQVR4nO3dbVNaBxBA4ZtWjRWVtmpp5e3//8uChokWG7my7K4n50xm8qGw2fUJasakDmtDN1QvYKdNYHgCwxMYnsDwBIYnMDyB4QkMT2B4AsMTGJ7A8ASGJzA8geEJDE9geALDExiewPAEhicwPIHhCQxPYHgCwxMYnsDwBIYnMDyB4QkMT2B4AsMTGJ7A8ASGJzA8geEJDE9geALDExiewPAEhicwPIHhCQxPYHgCwxMYnsDwBIYnMDyB4b0LvLx5WC8nw3D2mLGORXcI8NZ4vfgtYx2L7hDgxeXj8yt595xdp12tW8NxVW393gOWky9//rF9BV/uvY/+2YD/Oqa2wOv1ajqcr+e/POz9B4EZwCd57idMYHgCwxMYnsDwBIYnMDyB4QkMT2B4AsMTGJ7A8ASGJzA8geEJDE9geALDExiewPAEhicwPIHhCQxPYHgCwxMYnsDwBIYnMDyB4QkMT2B4AsMTGJ7A8ASGJzA8geEJDE9geALDExiewPAEhicwPIHhCQxPYHgCwxMYnsDwBIYnMDyB4QkMT2B4AsMTGJ7A8ASGJzA8NPDi6/63DxYYAbycfPsW5fvfIVpgAvBGeEP76hVc/W3pi4oDHo5s1NYHPGY5Ofvbd9GRwEdNGvfO4LAHLy7230ELDAKOf+4nTGB4AsMTGJ7A8ASGJzA8geEJDE9geALDExiewPAEhicwPIHhCQxPYHgCwxMYnsDwBIYnMDyB4QkMT2B4AsMTGJ7A8ASGJzA8geEJDE9geALDExiewPAEhicwPIHhCQxPYHgCwxMYnsDwBIYnMDyB4QkMT2B4AsMTGJ7A8ASGJzA8geEJDE9geALDExiewPAEhicwPIHhUYEXF8PV/TC88R2iBSYAr6a36/uN7uLycfRzWUGBlzcP6/nV88+75+wa8wuNWuq4TrUVE3j7Ct6W+QqOe1P23KoV8Ho52QrPMj8GCxx3YMvPogWOO1Dggq0Ezru/ZCuB8+4v2UrgvPtLthI47/6SrQTOu79kK4Hz7i/ZSuC8+0u2Ejjv/pKtBM67v2QrgfPuL9lK4Lz7S7YSOO/+kq0Ezru/ZCuB8+4v2UrgvPtLthI47/6SrQTOu79kqwLg1XQ4++f6buTF4x4+YnDe/SVb5QOvpleLy8f52d5fnDzguSdI4LgDnx+8vHnYAL/4q88jnnuCBI478OUreOYrOGermo/BwzDSV+CPbuVn0Xn3l2wlcN79JVsVfJI1efpXW2/885T3n3uCBI478OWDZ1cjLx738BGD8+4v2aoK2D8mJW1VBTz3XXTOVmUfg29HXjzu4SMG591fspWfRefdX7KVwHn3l2yVDfztHbR/TMrayldw3v0lWwmcd3/JVgXAM99FJ25V8Mek67v5+Xp2PvLicQ8fMTjv/pKtSr7g//xj3MWjHj1mcN79JVsVfMH/97vNj8VXgVO2KvgYvLGdD4NfbMjZys+i8+4v2UrgvPtLtqr4YsPYv4/1/bknSOC4A3cPXlwMw8g/JQn80a38enDe/SVb+QrOu79kKz8G591fspWfRefdX7KVwHn3l2wlcN79JVsJnHd/yVYC591fspXAefeXbCVw3v0lWwmcd3/JVgLn3V+ylcB595dsJXDe/SVbCZx3f8lWAufdX7KVwHn3l2wlcN79JVsJnHd/yVa9gBcXw5e7N/8HHgJ/cKtWwNtv8b6aXglMBX6GvT9/ATzsGvMLjVoq7v7huE6zVSvg7St40+zX/X+49CmAO45qBbxeTp7+ydJs/+/UCvzBUb2AT/PcHw+Ou7/lKIHj7m85SuC4+1uOEjju/pajBI67v+UogePubzlK4Lj7W44SOO7+lqMEjru/5SiB4+5vOUrguPtbjhI47v6WowSOu7/lKIHj7m85SuC4+1uOEjju/pajBI67v+UogePubzlK4Lj7W44SOO7+lqMEjru/5SiB4+5vOUrguPtbjhI47v6WowSOu7/lKIHj7m85SuC4+1uOEjju/pajBI67v+UogePubzlK4Lj7W44SOO7+lqMEjru/5SiB4+5vOUrguPtbjhI47v6WowSOu7/lKIHj7m85SuC4+1uOEjju/pajBI67v+UogePubzlK4Lj7W44SOO7+lqMEjru/5SiB4+5vOUrguPtbjhI47v6WowSOu7/lKIHj7m85SuC4+1uOEjju/pajBI67v+UogePubzlK4Lj7W44SOO7+lqMEjru/5SiB4+5vOUrguPtbjhI47v6WowSOu7/lKIHj7m85SuC4+1uOEjju/pajBI67v+UogePubzmqFfByMjz3/Vu8D7teTzqu9ipU4PVqenXQc1u+KXuO6gW8Xl7fHfLclm/KnqOaAR/43JZvyp6jBIaPEhg+SmD4KIHhowSGjxIYPkpg+CiB4aMEho8SGD5KYPgogeGjBIaPEhg+SmD4KIHhowSGjxIYPkpg+CiB4aMEho8SGD5KYPgogeGjBIaPEhg+SmD4KIHhowSGjxIYPkpg+CiB4aMEho8SGD5KYPgogeGjBIaPEhg+SmD4KIHhowSGjxIYPkpg+CiB4aMEho8SGD5KYPgogeGjBIaPEhg+SmD4KIHhowSGjxIYPkpg+CiB4aMEho8SGD5KYPgogeGjBIaPEhg+SmD4qF7Ai4v/fIf3/3luyzdlz1GtgFfT26ef52ePP35uyzdlz1GtgJc3D69+3j5n1+tJx/UzjTpyUtor2D5B7/9uWE6efte88THYPkHHfBZtnyCB4QkMT2B4AsMTGJ7A8ASGJzA8geEJDE9geALDExiewPAEhicwPIHhCQxPYHgCwxMYnsDwBIYnMDyB4QkMT2B4AsMTGJ7A8ASGJzA8geEJDE9geALDExiewPAEhicwPIHhCQxPYHgCwxMYnsDwBIYnMDyB4QkMT2B4AsMTGJ7A8ASGJzA8geEJDE9geALDExiewPAEhicwPIHhCQxPYHgCwxMYnsDwBIYnMDyB4f0L4ebOdWfizgQAAAAASUVORK5CYII=\n"
32 | },
33 | "metadata": {},
34 | "output_type": "display_data"
35 | }
36 | ],
37 | "source": [
38 | "%%R\n",
39 | "barplot(c(1,3,2,5,4), ylab=\"value\")\n"
40 | ]
41 | },
42 | {
43 | "cell_type": "code",
44 | "execution_count": 3,
45 | "metadata": {},
46 | "outputs": [
47 | {
48 | "data": {
49 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAMAAABKCk6nAAAA51BMVEUAAAAAADoAAGYAOmYAOpAAZrYzMzM6AAA6ADo6AGY6Ojo6OmY6OpA6ZmY6kLY6kNtNTU1NTW5NTY5NbqtNjshmAABmADpmAGZmOgBmOjpmOpBmZjpmtv9uTU1uTY5ubqtuq6tuq+SOTU2OTY6ObquOjsiOq+SOyP+QOgCQOjqQ29uQ2/+rbk2rbo6r5P+2ZgC2Zjq2kDq2/7a2///Ijk3Ijm7IyP/I///bkDrbtmbb25Db2//b/9vb///kq27kq47k/8jk///r6+v4dm3/tmb/yI7/25D/5Kv//7b//8j//9v//+T///+8MUTPAAAMs0lEQVR4nO2dDVvb1hmGnZZk68pmJZB13Ug6kw9DIdANUrxsmFKwjbH+/++ZZDshFvqyrdfn6NH9XL1MSd8e3de5c14d2UK0QiKdlmsAYhsEiwfB4kkTPDkOduOX5ycbxyFVJ03woBN+PBm/+/ztM+IkdoKjNfzhYvQq2Lme2f2dOIil4PH+bryMR++n3yWP9Hv50ZcotaqtLYLpCo71zl8Q7AjBUHC/G7mNX7qpR2rC7HqAYCg42kDvXE+30qlHasLseoBg26K/DoKdICBYHAHB4ggIFkdAsDgCgsURECyOgGBxBASLIyBYHAHB4ggIFkfwU/DNTenSZLyaXQ8QvBR8c7NouLaz6wECgp0O21DBtOjqhvVT8Oqlfs2uBwgIFkdAsDgCgsURECyOgGBxBASLIyBYHAHB4ggIFkdAsDgCgsURECyOgGBxBASLIyBYHAHB4ggIFkdAsDgCgsURECyOgGBxhA0KrvD5fDc3FQ6mnVqu4OSN8SsOywouHwT7ilBLwcmffFhxWASXD5ssXxEQLI6AYHEEBIsjIFgcAcHiCAgWR0CwOAKCxREQLI6AYHEEBIsjIFgcAcHiCAgWR0CwOAKCxREQLI6AYHEEBIsjIFgcAcHiCAgWR0CwOAKCxREQLI6AYHEEBIsjIFgcAcHiCO4Ef/kR0JyfBZ2ntrPrAYIzwV9+iDvvp7nnqe3seoCAYKfDCgumRW8GgU2WOAKCxREMBU+Og93ZS+qRmjC7HiAYCh50wo8n0ct5N/VITZhdDxBMW/Tkw8XVSSw6fBbF9TPfmhlLweP93WgNTwWHrGBHCLabrEHnCsFuEQwF97uRW87BjhFsd9E71+yiHSNwHSyOgGBxBASLIyBYHAHB4ggIFkdAsDgCgsURECyOgGBxBASLIyBYHAHB4ggIFkdAsDgCgsURECyOgGBxBASLIyBYHAHB4ggIFkdAsDgCgsURECyOgGBxBASLIyBYHAHB4ggIFkdAsDgCgsURECyOgGBxBASLIyBYHAHB4ggIFkfYoGDXD/VrZjxfwbOHhdd2+XiA4Lfg+eP+azu7HiAg2OmwTRdMi157WM8FL13q1+x6gIBgcQQEiyMgWBwBweIICBZHQLA4AoLFERAsjoBgcQQEiyMgWBwBweIICBZHQLA4AoLFERAsjoBgcQQEiyPUTfDsJq1ytcuMW2GpXwg1Ezy/zbJU7TLjVlnqFwKCKy/1C6FmgmnRy9bWTbCr2toiIFgcAcHiCAgWR0CwOAKCxREQLI6AYHEEBIsjIFgcAcHiCAgWR0CwOIKh4PF+8OJichw8P0k9UhNm1wMEQ8H9btjvjN9lHakJs+sBgm2LHnRHr4Kd6+gwUVw/1K+ZMRU8fns96ISj99NvWMFOECwFj99cxF8ix2lHasLseoBgKHj0+mJ6Ih50U4/UhNn1AMFQ8HkQBJ1oF72bfqQmzK4HCFwHiyMgWBwBweIICH5I3j3XCC6M94Jzf2oCwYVB8Jq1CF63lhadHQnBkggIFkdAsDgCgsURECyOgGBxBASLIyBYHAHB4ggIFkdAsDgCgsURECyOgGBxBASLIyBYHAHB4ggIFkdAsDgCgsURECyOgGBxBASLI+QKHm5flhzQmeBH9zKvOrsFvysAwYUxEfz4pxFWnN2i3/YhJHj4h9Y3Z2Gv1WrHgj9/vT88Gn7/t+g/pAfB9rUVCb7761HYezr87iz6l+H2p/nXqeA/HmUOSIu2r61I8Kwt3z4Nw9O94fZ/5l+ngnMa9hfBdy9bcZ48/rvAJssJQlnBs3WcOeDDCj7di//vlFoEO0FIbdG3W58WW/R3Z1F/LreCfziLX/79w6OzNYKdIORssvbmm6xoSZ62vv2xnOD7g3gFb31KWcGun/nWzFT+Rkd8Et7630H7UQkr2AkC72SJI9is4LRejmAnCFULnp+DUwwj2AlC1YLnu+iUd7wQ7ASh8hZ92p5dRT8Kgp0gVL6CZ+9ktR6/a41gJwjsosURECyOUP05OL1BI9gRgskuOjUIdoJQ+Qr+JetDYwQ7QcgSXPD5dzIPgnu0aK8QMgQX3cGSDC3aV4Sygu9ePvnHXnSR+81Z9LJ1eX+wuEr9aNExs1ez6wFC2Rbd27s/2Ovthff/jV5u27ftxberEm90uGnR07+VXs2uBwhlN1nRwuzFK/jJUXwd9DSyvBAvroPzBKeecR7VZp+X5AVHRuO7raLF25t9Wbxp2gvBOS06fU+RrM3ZecgLjk66f9rrtWbn4FY7PF28cdIPwdm1CC6RZFv+Or4LpkWXSK0Fr1tbWwQ+bBBHQLA4gq7gjPPp13+M4NLxT3DGjnjhjxFcOgi2r0XwYi0tehpdwdXW1hYBweIICBZHQLA4AoLFERAsjoBgcQQEiyMgWBwBweIICBZHQLA4AoLFEQwFj/eDFxeT42A3/UhNmF0PEAwF97thvzPohOfd1CM1YXY9QLBt0YPu1UkYOQ6fRXH6RL/GxlTw+O31x5ngkBXsCMFS8PjNRXiFYLcIhoJHry/C0JNzcPr9OwgunTTB50EQdPzYRWfcgYfg0vH8OhjB68ZzwbTodeO74LVra4uAYHEEBIsjIFgcAcFFme3PcksTWzgEJxgK41Lw/AorrzR5EYbgBENhELz6sAguCi06jrDgmiMgWBwBweIICBZHQLA4AoKLUmIXbY2wzrAILkiJ62BrhLWGRXBBEDyNrmBa9DTCgmuOgGBxBASLIyBYHAHB4ggIFkdAcHEMf6EagpctNai1/IVqCF62FMGJWgQXhxYtLrjWCAguCu9Fx9EVzKdJ0yDYEGGtYRFcFFp0HGHBNUdAsDgCgsURNijY9TPfmhlWsDgCglcuzfx98AhOMBTGS8EZz97aJEKZWgSvWorgRNQE06ITkRNcDwQEiyMgWBwBweIICBZHQLA4AoLFERAsjoBgcQQEiyMgWBwBwUbDZr5TvTmEaRBsM2z2Z00bQ5gFwTbDIlhcMC1aXbAvCAgWR0CwOAKCxREQLI6AYHEEBH9O/nUNggvjueCCdyYQXBgEr1mL4PVqadF5ERAsioDgkqUl31u2RFhpWASXS9lPhwwREGxZi+DC1FswLbowNRdcVwQEiyMguCj5T7pL69wITjAUxqXg/GdVpu69EJxgKAyCVx/WVHC/G06Og+cnqUeqieCvW3SKzEa36POgG47fZR2pLoIfSg1uha214PGv0QoevQp2rqPDRHH9UL+1Ewt2zbB0rFv0oBOO3k+/qf8KNrjXudYreCo4SuQ47Ug1FFxHBGvB8SLuph6pCbO7OYREc9noLno3/UhCs+seIbn/4zpYDAHB69b6juCmRS8EwU4QECyOgGBxBAQvUcobHXmpv2Dei84NgitAWL4WwUuU0qLzIiC4jggIFkdAsDgCgsURECyOgGBxBASLIyBYHAHB4ggIFkdAsDgCgsURECyOgOAKSjPveNscQmYtgtcvzb5ndWMI2bUIXr8UwalH0hFMi049kpBgnxEQLI6AYHEEBIsjIFgcAcHiCAgWR0CwOAKCxREQLI6AYHEEBIsjbFCw64f6NTOsYHEEBIsjIFgcAcHiCAgWR0CwOAKCxREQLI6AYHEEBIsjIFgcAcHiCAgWR0CwOAKCxREQLI6AYHEEBIsjIFgcAcHiCAgWR0CwOAKCxREQLI6AYHEEBIsjIFgcAcHiCAgWR0CwOAKCxREQLI6A4HojJB50+/lbBIsgJB5V/eVbBIsgILiqWl8RaNEV1dYWAcHiCAgWRzAV3O+Gk+NgN/1ITZhdDxAsBZ8H3XDQCc+7qUdqwux6gGAoePxrtIKvTmLH4bMorp/51sxYt+iPM8EhK9gRgrXgKwS7RbAWzDnYMQK7aHEEroPFERAsjoBgcQQEiyMgWBwBweIICBZHQLA4wgYFEyfZmOA1UhHkpsat17DlguDaDlsutoKJ8yBYPAgWD4LFYyh4vB+8uDAY9+GT6ooz+um6+kEj2ucn1Q9bOoaC+92w3zEYd9CJbxirPpPjHQPB43fVj7lMbFv0oGsy7OSDRWfo//OtgeDRq8Di703pmAoeW8xY3PstWvTop98scKN+M3pf/bClYyl4/MZiocUZGLT+fhAEFmcUG9rSMRQ8em3jd3bLp0FMGk5Ma3OiKhdDwedGSyLal9qc1UwEm+35S4brYPEgWDwIFg+CxYNg8SBYPPKC7/5+6RrBaeQFD7cRLJhY6+nT8P7w54PWVqMNiwq+Pzy6+3H7cjj9xzWM04gKDnvt2/YvR702Ldo1gFGG2//au/3L4RGCXQMY5f7w+7Phn6MdNIJF09u6vD9oR5dJL9lkEeEgWDwIFg+CxYNg8SBYPAgWz/8BzBzHM/nRJm0AAAAASUVORK5CYII=\n"
50 | },
51 | "metadata": {},
52 | "output_type": "display_data"
53 | }
54 | ],
55 | "source": [
56 | "%%R\n",
57 | "require(ggplot2)\n",
58 | "gg <- ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point(aes(colour='qsec')) + theme_bw()\n",
59 | "\n",
60 | "gg"
61 | ]
62 | },
63 | {
64 | "cell_type": "code",
65 | "execution_count": null,
66 | "metadata": {},
67 | "outputs": [],
68 | "source": []
69 | }
70 | ],
71 | "metadata": {
72 | "kernelspec": {
73 | "display_name": "Python 3",
74 | "language": "python",
75 | "name": "python3"
76 | },
77 | "language_info": {
78 | "codemirror_mode": {
79 | "name": "ipython",
80 | "version": 3
81 | },
82 | "file_extension": ".py",
83 | "mimetype": "text/x-python",
84 | "name": "python",
85 | "nbconvert_exporter": "python",
86 | "pygments_lexer": "ipython3",
87 | "version": "3.7.3"
88 | }
89 | },
90 | "nbformat": 4,
91 | "nbformat_minor": 2
92 | }
93 |
--------------------------------------------------------------------------------
/MANOVA_Test_in_Python_Statsmodels_Example.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "## How to Carry out MANOVA in Python\n",
8 | "Step one is to import Pandas and MANOVA:"
9 | ]
10 | },
11 | {
12 | "cell_type": "code",
13 | "execution_count": 1,
14 | "metadata": {},
15 | "outputs": [],
16 | "source": [
17 | "import pandas as pd\n",
18 | "from statsmodels.multivariate.manova import MANOVA"
19 | ]
20 | },
21 | {
22 | "cell_type": "markdown",
23 | "metadata": {},
24 | "source": [
25 | "Step two is to load data and rename columns:"
26 | ]
27 | },
28 | {
29 | "cell_type": "code",
30 | "execution_count": 2,
31 | "metadata": {},
32 | "outputs": [
33 | {
34 | "data": {
35 | "text/html": [
36 | "
\n",
37 | "\n",
50 | "
\n",
51 | " \n",
52 | " \n",
53 | " | \n",
54 | " Sepal_Length | \n",
55 | " Sepal_Width | \n",
56 | " Petal_Length | \n",
57 | " Petal_Width | \n",
58 | " Species | \n",
59 | "
\n",
60 | " \n",
61 | " \n",
62 | " \n",
63 | " 1 | \n",
64 | " 5.1 | \n",
65 | " 3.5 | \n",
66 | " 1.4 | \n",
67 | " 0.2 | \n",
68 | " setosa | \n",
69 | "
\n",
70 | " \n",
71 | " 2 | \n",
72 | " 4.9 | \n",
73 | " 3.0 | \n",
74 | " 1.4 | \n",
75 | " 0.2 | \n",
76 | " setosa | \n",
77 | "
\n",
78 | " \n",
79 | " 3 | \n",
80 | " 4.7 | \n",
81 | " 3.2 | \n",
82 | " 1.3 | \n",
83 | " 0.2 | \n",
84 | " setosa | \n",
85 | "
\n",
86 | " \n",
87 | " 4 | \n",
88 | " 4.6 | \n",
89 | " 3.1 | \n",
90 | " 1.5 | \n",
91 | " 0.2 | \n",
92 | " setosa | \n",
93 | "
\n",
94 | " \n",
95 | " 5 | \n",
96 | " 5.0 | \n",
97 | " 3.6 | \n",
98 | " 1.4 | \n",
99 | " 0.2 | \n",
100 | " setosa | \n",
101 | "
\n",
102 | " \n",
103 | "
\n",
104 | "
"
105 | ],
106 | "text/plain": [
107 | " Sepal_Length Sepal_Width Petal_Length Petal_Width Species\n",
108 | "1 5.1 3.5 1.4 0.2 setosa\n",
109 | "2 4.9 3.0 1.4 0.2 setosa\n",
110 | "3 4.7 3.2 1.3 0.2 setosa\n",
111 | "4 4.6 3.1 1.5 0.2 setosa\n",
112 | "5 5.0 3.6 1.4 0.2 setosa"
113 | ]
114 | },
115 | "execution_count": 2,
116 | "metadata": {},
117 | "output_type": "execute_result"
118 | }
119 | ],
120 | "source": [
121 | "url = 'https://vincentarelbundock.github.io/Rdatasets/csv/datasets/iris.csv'\n",
122 | "df = pd.read_csv(url, index_col=0)\n",
123 | "df.columns = df.columns.str.replace(\".\", \"_\") \n",
124 | "df.head()"
125 | ]
126 | },
127 | {
128 | "cell_type": "markdown",
129 | "metadata": {},
130 | "source": [
131 | "### Python MANOVA Example\n",
132 | "Third step is to carry out the MANOVA using *from_formula*:"
133 | ]
134 | },
135 | {
136 | "cell_type": "code",
137 | "execution_count": 3,
138 | "metadata": {},
139 | "outputs": [],
140 | "source": [
141 | "maov = MANOVA.from_formula('Sepal_Length + Sepal_Width + \\\n",
142 | " Petal_Length + Petal_Width ~ Species', data=df)"
143 | ]
144 | },
145 | {
146 | "cell_type": "markdown",
147 | "metadata": {},
148 | "source": [
149 | "Final step is to print the results using *mv_test*:"
150 | ]
151 | },
152 | {
153 | "cell_type": "code",
154 | "execution_count": 4,
155 | "metadata": {},
156 | "outputs": [
157 | {
158 | "name": "stdout",
159 | "output_type": "stream",
160 | "text": [
161 | " Multivariate linear model\n",
162 | "================================================================\n",
163 | " \n",
164 | "----------------------------------------------------------------\n",
165 | " Intercept Value Num DF Den DF F Value Pr > F\n",
166 | "----------------------------------------------------------------\n",
167 | " Wilks' lambda 0.0170 4.0000 144.0000 2086.7720 0.0000\n",
168 | " Pillai's trace 0.9830 4.0000 144.0000 2086.7720 0.0000\n",
169 | " Hotelling-Lawley trace 57.9659 4.0000 144.0000 2086.7720 0.0000\n",
170 | " Roy's greatest root 57.9659 4.0000 144.0000 2086.7720 0.0000\n",
171 | "----------------------------------------------------------------\n",
172 | " \n",
173 | "----------------------------------------------------------------\n",
174 | " Species Value Num DF Den DF F Value Pr > F\n",
175 | "----------------------------------------------------------------\n",
176 | " Wilks' lambda 0.0234 8.0000 288.0000 199.1453 0.0000\n",
177 | " Pillai's trace 1.1919 8.0000 290.0000 53.4665 0.0000\n",
178 | " Hotelling-Lawley trace 32.4773 8.0000 203.4024 582.1970 0.0000\n",
179 | " Roy's greatest root 32.1919 4.0000 145.0000 1166.9574 0.0000\n",
180 | "================================================================\n",
181 | "\n"
182 | ]
183 | }
184 | ],
185 | "source": [
186 | "print(maov.mv_test())"
187 | ]
188 | },
189 | {
190 | "cell_type": "code",
191 | "execution_count": null,
192 | "metadata": {},
193 | "outputs": [],
194 | "source": []
195 | }
196 | ],
197 | "metadata": {
198 | "kernelspec": {
199 | "display_name": "Python 3",
200 | "language": "python",
201 | "name": "python3"
202 | },
203 | "language_info": {
204 | "codemirror_mode": {
205 | "name": "ipython",
206 | "version": 3
207 | },
208 | "file_extension": ".py",
209 | "mimetype": "text/x-python",
210 | "name": "python",
211 | "nbconvert_exporter": "python",
212 | "pygments_lexer": "ipython3",
213 | "version": "3.7.4"
214 | }
215 | },
216 | "nbformat": 4,
217 | "nbformat_minor": 2
218 | }
219 |
--------------------------------------------------------------------------------
/NamesAndAges.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/NamesAndAges.xlsx
--------------------------------------------------------------------------------
/Pandas_read_html_example_code.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 1,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "import pandas as pd\n",
10 | "\n",
11 | "url = 'https://en.wikipedia.org/wiki/List_of_Capsicum_cultivars'\n",
12 | "data = pd.read_html(url, flavor='bs4', header=0, encoding='UTF8')"
13 | ]
14 | },
15 | {
16 | "cell_type": "code",
17 | "execution_count": 2,
18 | "metadata": {},
19 | "outputs": [],
20 | "source": [
21 | "# Let's remove the last table \n",
22 | "del data[-1]"
23 | ]
24 | },
25 | {
26 | "cell_type": "code",
27 | "execution_count": 3,
28 | "metadata": {},
29 | "outputs": [],
30 | "source": [
31 | "species = ['Capsicum annum', 'Capsicum baccatum', 'Capsicum chinense',\n",
32 | " 'Capsicum frutescens', 'Capsicum pubescens']\n",
33 | "\n",
34 | "\n",
35 | "for i in range(len(species)):\n",
36 | " data[i]['Species'] = species[i]"
37 | ]
38 | },
39 | {
40 | "cell_type": "code",
41 | "execution_count": 5,
42 | "metadata": {},
43 | "outputs": [
44 | {
45 | "data": {
46 | "text/html": [
47 | "\n",
48 | "\n",
61 | "
\n",
62 | " \n",
63 | " \n",
64 | " | \n",
65 | " Image | \n",
66 | " Name | \n",
67 | " Type | \n",
68 | " Origin | \n",
69 | " Heat | \n",
70 | " Pod size | \n",
71 | " Description | \n",
72 | " Species | \n",
73 | "
\n",
74 | " \n",
75 | " \n",
76 | " \n",
77 | " 0 | \n",
78 | " NaN | \n",
79 | " Aleppo | \n",
80 | " NaN | \n",
81 | " Syria and Turkey | \n",
82 | " 15,000 SR | \n",
83 | " NaN | \n",
84 | " Grown in Syria and Turkey and used, in coarsel... | \n",
85 | " Capsicum annum | \n",
86 | "
\n",
87 | " \n",
88 | " 1 | \n",
89 | " NaN | \n",
90 | " Anaheim[14] | \n",
91 | " Anaheim | \n",
92 | " United States | \n",
93 | " 500–2,500 SR | \n",
94 | " 15 cm (5.9 in) | \n",
95 | " A mild variety of New Mexico chile. It was lat... | \n",
96 | " Capsicum annum | \n",
97 | "
\n",
98 | " \n",
99 | " 2 | \n",
100 | " NaN | \n",
101 | " Banana | \n",
102 | " Waxy | \n",
103 | " NaN | \n",
104 | " 0–500 SR | \n",
105 | " 15 cm (5.9 in) | \n",
106 | " Often it is pickled and used as an ingredient ... | \n",
107 | " Capsicum annum | \n",
108 | "
\n",
109 | " \n",
110 | " 3 | \n",
111 | " NaN | \n",
112 | " Bird's Eye | \n",
113 | " Small hot | \n",
114 | " Southeast Asia | \n",
115 | " 50,000–100,000[15] SR | \n",
116 | " 4 cm (1.6 in) | \n",
117 | " A Southeast Asian cultivar known by many local... | \n",
118 | " Capsicum annum | \n",
119 | "
\n",
120 | " \n",
121 | " 4 | \n",
122 | " NaN | \n",
123 | " Black Hungarian[16] | \n",
124 | " Ornamental/ Culinary | \n",
125 | " Hungary | \n",
126 | " 5,000–10,000 SR | \n",
127 | " 5–7 cm (≈ 2–3 in) | \n",
128 | " Grows in a conical shape with a slight curve n... | \n",
129 | " Capsicum annum | \n",
130 | "
\n",
131 | " \n",
132 | "
\n",
133 | "
"
134 | ],
135 | "text/plain": [
136 | " Image Name Type Origin \\\n",
137 | "0 NaN Aleppo NaN Syria and Turkey \n",
138 | "1 NaN Anaheim[14] Anaheim United States \n",
139 | "2 NaN Banana Waxy NaN \n",
140 | "3 NaN Bird's Eye Small hot Southeast Asia \n",
141 | "4 NaN Black Hungarian[16] Ornamental/ Culinary Hungary \n",
142 | "\n",
143 | " Heat Pod size \\\n",
144 | "0 15,000 SR NaN \n",
145 | "1 500–2,500 SR 15 cm (5.9 in) \n",
146 | "2 0–500 SR 15 cm (5.9 in) \n",
147 | "3 50,000–100,000[15] SR 4 cm (1.6 in) \n",
148 | "4 5,000–10,000 SR 5–7 cm (≈ 2–3 in) \n",
149 | "\n",
150 | " Description Species \n",
151 | "0 Grown in Syria and Turkey and used, in coarsel... Capsicum annum \n",
152 | "1 A mild variety of New Mexico chile. It was lat... Capsicum annum \n",
153 | "2 Often it is pickled and used as an ingredient ... Capsicum annum \n",
154 | "3 A Southeast Asian cultivar known by many local... Capsicum annum \n",
155 | "4 Grows in a conical shape with a slight curve n... Capsicum annum "
156 | ]
157 | },
158 | "execution_count": 5,
159 | "metadata": {},
160 | "output_type": "execute_result"
161 | }
162 | ],
163 | "source": [
164 | "df = pd.concat(data, sort=False) \n",
165 | "df.head()"
166 | ]
167 | },
168 | {
169 | "cell_type": "code",
170 | "execution_count": 8,
171 | "metadata": {},
172 | "outputs": [],
173 | "source": [
174 | "import re\n",
175 | "import numpy as np\n",
176 | "\n",
177 | "# Remove brackets and whats between them (e.g. [14])\n",
178 | "df['Name'] = df['Name'].map(lambda x: re.sub(\"[\\(\\[].*?[\\)\\]]\", \"\", x)\n",
179 | " if isinstance(x, str) else np.NaN)\n",
180 | "\n",
181 | "# Pod Size get cm\n",
182 | "df['Pod size'] = df['Pod size'].map(lambda x: x.split(' ', 1)[0].rstrip('cm') \n",
183 | " if isinstance(x, str) else np.NaN)\n",
184 | "\n",
185 | "# Taking the largest number in a range and convert all values to float\n",
186 | "df['Pod size'] = df['Pod size'].map(lambda x: x.split('–', 1)[-1]\n",
187 | " if isinstance(x, str) else np.NaN)\n",
188 | "# Convert to float\n",
189 | "df['Pod size'] = df['Pod size'].map(lambda x: float(x))\n",
190 | "\n",
191 | "# Taking the largest SHU\n",
192 | "df['Heat'] = df['Heat'].map(lambda x: re.sub(\"[\\(\\[].*?[\\)\\]]\", \"\", x) \n",
193 | " if isinstance(x, str) else np.NaN)\n",
194 | "df['Heat'] = df['Heat'].str.replace(',', '')\n",
195 | "df['Heat'] = df['Heat'].map(lambda x: float(re.findall(r'\\d+(?:,\\d+)?', x)[-1])\n",
196 | " if isinstance(x, str) else np.NaN)"
197 | ]
198 | },
199 | {
200 | "cell_type": "code",
201 | "execution_count": 9,
202 | "metadata": {},
203 | "outputs": [
204 | {
205 | "data": {
206 | "text/plain": [
207 | "Image 65\n",
208 | "Name 0\n",
209 | "Type 39\n",
210 | "Origin 28\n",
211 | "Heat 9\n",
212 | "Pod size 33\n",
213 | "Description 8\n",
214 | "Species 0\n",
215 | "dtype: int64"
216 | ]
217 | },
218 | "execution_count": 9,
219 | "metadata": {},
220 | "output_type": "execute_result"
221 | }
222 | ],
223 | "source": [
224 | "df.isna().sum()"
225 | ]
226 | },
227 | {
228 | "cell_type": "code",
229 | "execution_count": 10,
230 | "metadata": {},
231 | "outputs": [
232 | {
233 | "data": {
234 | "text/plain": [
235 | "Capsicum annum 39\n",
236 | "Capsicum chinense 17\n",
237 | "Capsicum frutescens 4\n",
238 | "Capsicum baccatum 3\n",
239 | "Capsicum pubescens 2\n",
240 | "Name: Species, dtype: int64"
241 | ]
242 | },
243 | "execution_count": 10,
244 | "metadata": {},
245 | "output_type": "execute_result"
246 | }
247 | ],
248 | "source": [
249 | "df['Species'].value_counts()"
250 | ]
251 | },
252 | {
253 | "cell_type": "code",
254 | "execution_count": null,
255 | "metadata": {},
256 | "outputs": [],
257 | "source": []
258 | }
259 | ],
260 | "metadata": {
261 | "kernelspec": {
262 | "display_name": "Python 3",
263 | "language": "python",
264 | "name": "python3"
265 | },
266 | "language_info": {
267 | "codemirror_mode": {
268 | "name": "ipython",
269 | "version": 3
270 | },
271 | "file_extension": ".py",
272 | "mimetype": "text/x-python",
273 | "name": "python",
274 | "nbconvert_exporter": "python",
275 | "pygments_lexer": "ipython3",
276 | "version": "3.7.1"
277 | }
278 | },
279 | "nbformat": 4,
280 | "nbformat_minor": 2
281 | }
282 |
--------------------------------------------------------------------------------
/Python_ANOVA/Python repeated measures ANOVA.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "## Python Repeated Measures ANOVA using Statsmodels AnovaRM\n",
8 | "This code examples show you how to carry out a repeated measures ANOVA using Statsmodels AnovaRM. This notbooke contains the code for the YouTube [Tutorial on how to carry out repeated measures anova](https://youtu.be/_X3g-dvlMF0) in Python. You will learn both one-way and two-way anova for repeated measures by watching the mentioned video.",
9 | "\n\n There are also more Python ANOVA guides found on [https://www.marsja.se](https://www.marsja.se])"]
10 | },
11 | {
12 | "cell_type": "code",
13 | "execution_count": 6,
14 | "metadata": {},
15 | "outputs": [
16 | {
17 | "name": "stdout",
18 | "output_type": "stream",
19 | "text": [
20 | "Help on class AnovaRM in module statsmodels.stats.anova:\n",
21 | "\n",
22 | "class AnovaRM(builtins.object)\n",
23 | " | Repeated measures Anova using least squares regression\n",
24 | " | \n",
25 | " | The full model regression residual sum of squares is\n",
26 | " | used to compare with the reduced model for calculating the\n",
27 | " | within-subject effect sum of squares [1].\n",
28 | " | \n",
29 | " | Currently, only fully balanced within-subject designs are supported.\n",
30 | " | Calculation of between-subject effects and corrections for violation of\n",
31 | " | sphericity are not yet implemented.\n",
32 | " | \n",
33 | " | Parameters\n",
34 | " | ----------\n",
35 | " | data : DataFrame\n",
36 | " | depvar : string\n",
37 | " | The dependent variable in `data`\n",
38 | " | subject : string\n",
39 | " | Specify the subject id\n",
40 | " | within : a list of string(s)\n",
41 | " | The within-subject factors\n",
42 | " | between : a list of string(s)\n",
43 | " | The between-subject factors, this is not yet implemented\n",
44 | " | aggregate_func : None, 'mean', or function\n",
45 | " | If the data set contains more than a single observation per subject\n",
46 | " | and cell of the specified model, this function will be used to\n",
47 | " | aggregate the data before running the Anova. `None` (the default) will\n",
48 | " | not perform any aggregation; 'mean' is s shortcut to `numpy.mean`.\n",
49 | " | An exception will be raised if aggregation is required, but no\n",
50 | " | aggregation function was specified.\n",
51 | " | \n",
52 | " | Returns\n",
53 | " | -------\n",
54 | " | results: AnovaResults instance\n",
55 | " | \n",
56 | " | Raises\n",
57 | " | ------\n",
58 | " | ValueError\n",
59 | " | If the data need to be aggregated, but `aggregate_func` was not\n",
60 | " | specified.\n",
61 | " | \n",
62 | " | Notes\n",
63 | " | -----\n",
64 | " | This implementation currently only supports fully balanced designs. If the\n",
65 | " | data contain more than one observation per subject and cell of the design,\n",
66 | " | these observations need to be aggregated into a single observation\n",
67 | " | before the Anova is calculated, either manually or by passing an aggregation\n",
68 | " | function via the `aggregate_func` keyword argument.\n",
69 | " | Note that if the input data set was not balanced before performing the\n",
70 | " | aggregation, the implied heteroscedasticity of the data is ignored.\n",
71 | " | \n",
72 | " | References\n",
73 | " | ----------\n",
74 | " | .. [*] Rutherford, Andrew. Anova and ANCOVA: a GLM approach. John Wiley & Sons, 2011.\n",
75 | " | \n",
76 | " | Methods defined here:\n",
77 | " | \n",
78 | " | __init__(self, data, depvar, subject, within=None, between=None, aggregate_func=None)\n",
79 | " | Initialize self. See help(type(self)) for accurate signature.\n",
80 | " | \n",
81 | " | fit(self)\n",
82 | " | estimate the model and compute the Anova table\n",
83 | " | \n",
84 | " | Returns\n",
85 | " | -------\n",
86 | " | AnovaResults instance\n",
87 | " | \n",
88 | " | ----------------------------------------------------------------------\n",
89 | " | Data descriptors defined here:\n",
90 | " | \n",
91 | " | __dict__\n",
92 | " | dictionary for instance variables (if defined)\n",
93 | " | \n",
94 | " | __weakref__\n",
95 | " | list of weak references to the object (if defined)\n",
96 | "\n"
97 | ]
98 | }
99 | ],
100 | "source": [
101 | "import pandas as pd\n",
102 | "from statsmodels.stats.anova import AnovaRM\n",
103 | "\n",
104 | "help(AnovaRM)"
105 | ]
106 | },
107 | {
108 | "cell_type": "code",
109 | "execution_count": 7,
110 | "metadata": {},
111 | "outputs": [
112 | {
113 | "name": "stdout",
114 | "output_type": "stream",
115 | "text": [
116 | " Anova\n",
117 | "===================================\n",
118 | " Num DF Den DF F Value Pr > F\n",
119 | "-----------------------------------\n",
120 | "cond 1.0000 59.0000 499.1549 0.0000\n",
121 | "===================================\n",
122 | "\n"
123 | ]
124 | }
125 | ],
126 | "source": [
127 | "df = pd.read_csv('rmAOV1way.csv')\n",
128 | "\n",
129 | "aovrm = AnovaRM(df, 'rt', 'Sub_id', within=['cond'])\n",
130 | "res = aovrm.fit()\n",
131 | "\n",
132 | "print(res)"
133 | ]
134 | },
135 | {
136 | "cell_type": "code",
137 | "execution_count": 9,
138 | "metadata": {},
139 | "outputs": [
140 | {
141 | "name": "stdout",
142 | "output_type": "stream",
143 | "text": [
144 | " Anova\n",
145 | "========================================\n",
146 | " Num DF Den DF F Value Pr > F\n",
147 | "----------------------------------------\n",
148 | "iv1 1.0000 59.0000 2207.0162 0.0000\n",
149 | "iv2 2.0000 118.0000 275.4144 0.0000\n",
150 | "iv1:iv2 2.0000 118.0000 1.8651 0.1594\n",
151 | "========================================\n",
152 | "\n"
153 | ]
154 | }
155 | ],
156 | "source": [
157 | "df2way = pd.read_csv('rmAOV2way.csv')\n",
158 | "aovrm2way = AnovaRM(df2way, 'rt', 'Sub_id', within=['iv1', 'iv2'])\n",
159 | "res2way = aovrm2way.fit()\n",
160 | "\n",
161 | "print(res2way)"
162 | ]
163 | },
164 | {
165 | "cell_type": "code",
166 | "execution_count": null,
167 | "metadata": {},
168 | "outputs": [],
169 | "source": []
170 | }
171 | ],
172 | "metadata": {
173 | "kernelspec": {
174 | "display_name": "Python 3",
175 | "language": "python",
176 | "name": "python3"
177 | },
178 | "language_info": {
179 | "codemirror_mode": {
180 | "name": "ipython",
181 | "version": 3
182 | },
183 | "file_extension": ".py",
184 | "mimetype": "text/x-python",
185 | "name": "python",
186 | "nbconvert_exporter": "python",
187 | "pygments_lexer": "ipython3",
188 | "version": "3.6.6"
189 | }
190 | },
191 | "nbformat": 4,
192 | "nbformat_minor": 2
193 | }
194 |
--------------------------------------------------------------------------------
/Python_ANOVA/Repeated measures ANOVA using R and afex.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "## How to Carry out Repeated Measures ANOVA using R and afex\n",
8 | "\n",
9 | "Here you will learn how to carry out an one-way and a two-way ANOVA for repeated measures using the R-package afex. \n",
10 | "This notebook is, furthermore, for the YouTube video on how to carry out a [within-subjects ANOVA in Python and R](https://youtu.be/_X3g-dvlMF0). Make sure to watch that Python statsmodels tutorial to learn more about R vs Python when it comes to repeated measures ANOVA."
11 | ]
12 | },
13 | {
14 | "cell_type": "code",
15 | "execution_count": 1,
16 | "metadata": {},
17 | "outputs": [
18 | {
19 | "name": "stderr",
20 | "output_type": "stream",
21 | "text": [
22 | "Loading required package: lme4\n",
23 | "Loading required package: Matrix\n",
24 | "************\n",
25 | "Welcome to afex. For support visit: http://afex.singmann.science/\n",
26 | "- Functions for ANOVAs: aov_car(), aov_ez(), and aov_4()\n",
27 | "- Methods for calculating p-values with mixed(): 'KR', 'S', 'LRT', and 'PB'\n",
28 | "- 'afex_aov' and 'mixed' objects can be passed to emmeans() for follow-up tests\n",
29 | "- NEWS: library('emmeans') now needs to be called explicitly!\n",
30 | "- Get and set global package options with: afex_options()\n",
31 | "- Set orthogonal sum-to-zero contrasts globally: set_sum_contrasts()\n",
32 | "- For example analyses see: browseVignettes(\"afex\")\n",
33 | "************\n",
34 | "\n",
35 | "Attaching package: 'afex'\n",
36 | "\n",
37 | "The following object is masked from 'package:lme4':\n",
38 | "\n",
39 | " lmer\n",
40 | "\n"
41 | ]
42 | }
43 | ],
44 | "source": [
45 | "library(afex)"
46 | ]
47 | },
48 | {
49 | "cell_type": "code",
50 | "execution_count": 2,
51 | "metadata": {},
52 | "outputs": [],
53 | "source": [
54 | "help(aov_ez)"
55 | ]
56 | },
57 | {
58 | "cell_type": "code",
59 | "execution_count": 3,
60 | "metadata": {},
61 | "outputs": [],
62 | "source": [
63 | "df <- read.csv('rmAOV1way.csv')"
64 | ]
65 | },
66 | {
67 | "cell_type": "code",
68 | "execution_count": 4,
69 | "metadata": {},
70 | "outputs": [
71 | {
72 | "data": {
73 | "text/plain": [
74 | "Anova Table (Type 3 tests)\n",
75 | "\n",
76 | "Response: rt\n",
77 | " Effect df MSE F ges p.value\n",
78 | "1 cond 1, 59 7753.97 499.15 *** .77 <.0001\n",
79 | "---\n",
80 | "Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1"
81 | ]
82 | },
83 | "metadata": {},
84 | "output_type": "display_data"
85 | }
86 | ],
87 | "source": [
88 | "aov <- aov_ez('Sub_id', 'rt', df, within = 'cond')\n",
89 | "aov"
90 | ]
91 | },
92 | {
93 | "cell_type": "code",
94 | "execution_count": 5,
95 | "metadata": {},
96 | "outputs": [
97 | {
98 | "data": {
99 | "text/plain": [
100 | "Anova Table (Type 3 tests)\n",
101 | "\n",
102 | "Response: rt\n",
103 | " Effect df MSE F ges p.value\n",
104 | "1 iv1 1, 59 10958.55 2207.02 *** .87 <.0001\n",
105 | "2 iv2 1.98, 116.79 8871.20 275.41 *** .58 <.0001\n",
106 | "3 iv1:iv2 1.97, 116.37 10668.36 1.87 .01 .16\n",
107 | "---\n",
108 | "Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1\n",
109 | "\n",
110 | "Sphericity correction method: GG "
111 | ]
112 | },
113 | "metadata": {},
114 | "output_type": "display_data"
115 | }
116 | ],
117 | "source": [
118 | "df2way <- read.csv('rmAOV2way.csv')\n",
119 | "\n",
120 | "aov2way <- aov_ez('Sub_id', 'rt', df2way, within = c('iv1', 'iv2'))\n",
121 | "aov2way"
122 | ]
123 | },
124 | {
125 | "cell_type": "code",
126 | "execution_count": null,
127 | "metadata": {},
128 | "outputs": [],
129 | "source": []
130 | }
131 | ],
132 | "metadata": {
133 | "kernelspec": {
134 | "display_name": "R",
135 | "language": "R",
136 | "name": "ir"
137 | },
138 | "language_info": {
139 | "codemirror_mode": "r",
140 | "file_extension": ".r",
141 | "mimetype": "text/x-r-source",
142 | "name": "R",
143 | "pygments_lexer": "r",
144 | "version": "3.6.0"
145 | }
146 | },
147 | "nbformat": 4,
148 | "nbformat_minor": 2
149 | }
150 |
--------------------------------------------------------------------------------
/Python_ANOVA/Two_Way_ANOVA_in_Python_using_Pingouin_Stats.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 1,
6 | "metadata": {},
7 | "outputs": [
8 | {
9 | "data": {
10 | "text/html": [
11 | "\n",
12 | "\n",
25 | "
\n",
26 | " \n",
27 | " \n",
28 | " | \n",
29 | " len | \n",
30 | " supp | \n",
31 | " dose | \n",
32 | "
\n",
33 | " \n",
34 | " \n",
35 | " \n",
36 | " 1 | \n",
37 | " 4.2 | \n",
38 | " VC | \n",
39 | " 0.5 | \n",
40 | "
\n",
41 | " \n",
42 | " 2 | \n",
43 | " 11.5 | \n",
44 | " VC | \n",
45 | " 0.5 | \n",
46 | "
\n",
47 | " \n",
48 | " 3 | \n",
49 | " 7.3 | \n",
50 | " VC | \n",
51 | " 0.5 | \n",
52 | "
\n",
53 | " \n",
54 | " 4 | \n",
55 | " 5.8 | \n",
56 | " VC | \n",
57 | " 0.5 | \n",
58 | "
\n",
59 | " \n",
60 | " 5 | \n",
61 | " 6.4 | \n",
62 | " VC | \n",
63 | " 0.5 | \n",
64 | "
\n",
65 | " \n",
66 | "
\n",
67 | "
"
68 | ],
69 | "text/plain": [
70 | " len supp dose\n",
71 | "1 4.2 VC 0.5\n",
72 | "2 11.5 VC 0.5\n",
73 | "3 7.3 VC 0.5\n",
74 | "4 5.8 VC 0.5\n",
75 | "5 6.4 VC 0.5"
76 | ]
77 | },
78 | "execution_count": 1,
79 | "metadata": {},
80 | "output_type": "execute_result"
81 | }
82 | ],
83 | "source": [
84 | "import pandas as pd\n",
85 | "import pingouin as pg\n",
86 | "\n",
87 | "data = 'https://vincentarelbundock.github.io/Rdatasets/csv/datasets/ToothGrowth.csv'\n",
88 | "\n",
89 | "df = pd.read_csv(data, index_col=0)\n",
90 | "df.head()"
91 | ]
92 | },
93 | {
94 | "cell_type": "code",
95 | "execution_count": 2,
96 | "metadata": {},
97 | "outputs": [
98 | {
99 | "name": "stdout",
100 | "output_type": "stream",
101 | "text": [
102 | " Source SS DF MS F p-unc np2\n",
103 | "0 supp 205.350 1 205.350 15.571979 2.311828e-04 0.223825\n",
104 | "1 dose 2426.434 2 1213.217 91.999952 4.046303e-18 0.773109\n",
105 | "2 supp * dose 108.319 2 54.160 4.107004 2.186003e-02 0.132028\n",
106 | "3 residual 712.106 54 13.187 NaN NaN NaN\n"
107 | ]
108 | }
109 | ],
110 | "source": [
111 | "aov = pg.anova(dv='len', between=['supp', 'dose'], data=df,\n",
112 | " detailed=True)\n",
113 | "\n",
114 | "print(aov)"
115 | ]
116 | }
117 | ],
118 | "metadata": {
119 | "kernelspec": {
120 | "display_name": "Python 3",
121 | "language": "python",
122 | "name": "python3"
123 | },
124 | "language_info": {
125 | "codemirror_mode": {
126 | "name": "ipython",
127 | "version": 3
128 | },
129 | "file_extension": ".py",
130 | "mimetype": "text/x-python",
131 | "name": "python",
132 | "nbconvert_exporter": "python",
133 | "pygments_lexer": "ipython3",
134 | "version": "3.7.1"
135 | }
136 | },
137 | "nbformat": 4,
138 | "nbformat_minor": 2
139 | }
140 |
--------------------------------------------------------------------------------
/Python_ANOVA/pingouin-code-ANOVA-in-Python.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 4,
6 | "metadata": {},
7 | "outputs": [
8 | {
9 | "data": {
10 | "text/html": [
11 | "\n",
12 | "\n",
25 | "
\n",
26 | " \n",
27 | " \n",
28 | " | \n",
29 | " weight | \n",
30 | " group | \n",
31 | "
\n",
32 | " \n",
33 | " \n",
34 | " \n",
35 | " 1 | \n",
36 | " 4.17 | \n",
37 | " ctrl | \n",
38 | "
\n",
39 | " \n",
40 | " 2 | \n",
41 | " 5.58 | \n",
42 | " ctrl | \n",
43 | "
\n",
44 | " \n",
45 | " 3 | \n",
46 | " 5.18 | \n",
47 | " ctrl | \n",
48 | "
\n",
49 | " \n",
50 | " 4 | \n",
51 | " 6.11 | \n",
52 | " ctrl | \n",
53 | "
\n",
54 | " \n",
55 | " 5 | \n",
56 | " 4.50 | \n",
57 | " ctrl | \n",
58 | "
\n",
59 | " \n",
60 | "
\n",
61 | "
"
62 | ],
63 | "text/plain": [
64 | " weight group\n",
65 | "1 4.17 ctrl\n",
66 | "2 5.58 ctrl\n",
67 | "3 5.18 ctrl\n",
68 | "4 6.11 ctrl\n",
69 | "5 4.50 ctrl"
70 | ]
71 | },
72 | "execution_count": 4,
73 | "metadata": {},
74 | "output_type": "execute_result"
75 | }
76 | ],
77 | "source": [
78 | "import pandas as pd\n",
79 | "import pingouin as pg\n",
80 | "\n",
81 | "data = \"https://vincentarelbundock.github.io/Rdatasets/csv/datasets/PlantGrowth.csv\"\n",
82 | "\n",
83 | "df = pd.read_csv(data, index_col=0)\n",
84 | "df.head()"
85 | ]
86 | },
87 | {
88 | "cell_type": "code",
89 | "execution_count": 5,
90 | "metadata": {},
91 | "outputs": [
92 | {
93 | "name": "stdout",
94 | "output_type": "stream",
95 | "text": [
96 | " Source SS DF MS F p-unc np2\n",
97 | "0 group 3.766 2 1.883 4.846 0.01591 0.264\n",
98 | "1 Within 10.492 27 0.389 - - -\n"
99 | ]
100 | }
101 | ],
102 | "source": [
103 | "aov = pg.anova(data=df, dv='weight', between='group', detailed=True)\n",
104 | "print(aov)"
105 | ]
106 | },
107 | {
108 | "cell_type": "code",
109 | "execution_count": 7,
110 | "metadata": {},
111 | "outputs": [
112 | {
113 | "name": "stdout",
114 | "output_type": "stream",
115 | "text": [
116 | " A B mean(A) mean(B) diff SE tail T p-tukey \\\n",
117 | "0 ctrl trt1 5.032 4.661 0.371 0.279 two-sided 1.330 0.380686 \n",
118 | "1 ctrl trt2 5.032 5.526 -0.494 0.279 two-sided -1.771 0.182907 \n",
119 | "2 trt1 trt2 4.661 5.526 -0.865 0.279 two-sided -3.101 0.006347 \n",
120 | "\n",
121 | " efsize eftype \n",
122 | "0 0.570 hedges \n",
123 | "1 -0.759 hedges \n",
124 | "2 -1.328 hedges \n"
125 | ]
126 | }
127 | ],
128 | "source": [
129 | "pt = pg.pairwise_tukey(dv='weight', between='group', data=df)\n",
130 | "print(pt)"
131 | ]
132 | },
133 | {
134 | "cell_type": "code",
135 | "execution_count": 9,
136 | "metadata": {},
137 | "outputs": [
138 | {
139 | "name": "stdout",
140 | "output_type": "stream",
141 | "text": [
142 | " A B mean(A) mean(B) diff SE tail T p-tukey \\\n",
143 | "0 ctrl trt1 5.032 4.661 0.371 0.279 two-sided 1.330 0.380686 \n",
144 | "1 ctrl trt2 5.032 5.526 -0.494 0.279 two-sided -1.771 0.182907 \n",
145 | "2 trt1 trt2 4.661 5.526 -0.865 0.279 two-sided -3.101 0.006347 \n",
146 | "\n",
147 | " efsize eftype \n",
148 | "0 0.595 cohen \n",
149 | "1 -0.792 cohen \n",
150 | "2 -1.387 cohen \n"
151 | ]
152 | }
153 | ],
154 | "source": [
155 | "pt = pg.pairwise_tukey(dv='weight', between='group', effsize='cohen', data=df)\n",
156 | "print(pt)"
157 | ]
158 | }
159 | ],
160 | "metadata": {
161 | "kernelspec": {
162 | "display_name": "Python 3",
163 | "language": "python",
164 | "name": "python3"
165 | },
166 | "language_info": {
167 | "codemirror_mode": {
168 | "name": "ipython",
169 | "version": 3
170 | },
171 | "file_extension": ".py",
172 | "mimetype": "text/x-python",
173 | "name": "python",
174 | "nbconvert_exporter": "python",
175 | "pygments_lexer": "ipython3",
176 | "version": "3.7.1"
177 | }
178 | },
179 | "nbformat": 4,
180 | "nbformat_minor": 2
181 | }
182 |
--------------------------------------------------------------------------------
/Python_ANOVA/rmAOV1way.csv:
--------------------------------------------------------------------------------
1 | Sub_id,rt,cond
2 | 1,971.8265632087922,noise
3 | 2,857.6081665372951,noise
4 | 3,1035.3547583022873,noise
5 | 4,867.6208707594525,noise
6 | 5,928.3818313279531,noise
7 | 6,925.6146127265147,noise
8 | 7,1021.1715184399466,noise
9 | 8,1021.1445203023742,noise
10 | 9,1153.8435030155763,noise
11 | 10,1256.0521124105512,noise
12 | 11,1123.3607149851873,noise
13 | 12,1042.1812156235676,noise
14 | 13,763.5502095684848,noise
15 | 14,1035.0208763443406,noise
16 | 15,1028.4994225524808,noise
17 | 16,989.6639760469989,noise
18 | 17,1092.6373053971492,noise
19 | 18,1043.7295230300795,noise
20 | 19,1038.9305716948277,noise
21 | 20,908.6886912581376,noise
22 | 21,932.5560583939308,noise
23 | 22,876.1058831160847,noise
24 | 23,965.2362523707013,noise
25 | 24,1007.7496902800759,noise
26 | 25,989.978685384451,noise
27 | 26,895.4807183579585,noise
28 | 27,1005.6937169374387,noise
29 | 28,1067.157942842713,noise
30 | 29,903.472425096159,noise
31 | 30,944.5746497981069,noise
32 | 31,943.5133313551236,noise
33 | 32,843.2930486455783,noise
34 | 33,1014.4398005283206,noise
35 | 34,1188.6216727775868,noise
36 | 35,979.6565773417524,noise
37 | 36,963.1535965013347,noise
38 | 37,813.3130010242858,noise
39 | 38,983.855671231996,noise
40 | 39,933.9973630248538,noise
41 | 40,823.2535319503254,noise
42 | 41,999.0599084890516,noise
43 | 42,1072.7234677287029,noise
44 | 43,1024.1723422309747,noise
45 | 44,891.2174512791711,noise
46 | 45,973.75927986181,noise
47 | 46,901.6719732851515,noise
48 | 47,1118.1938491941837,noise
49 | 48,1119.2327975295375,noise
50 | 49,1060.0390154609372,noise
51 | 50,1243.2253586909187,noise
52 | 51,1140.3877297982679,noise
53 | 52,1009.9325677909709,noise
54 | 53,978.7066481634288,noise
55 | 54,890.1766147197222,noise
56 | 55,1036.043633534516,noise
57 | 56,1067.2768464746503,noise
58 | 57,1087.6042322333828,noise
59 | 58,955.1675205042003,noise
60 | 59,1028.8953415509754,noise
61 | 60,971.313871316799,noise
62 | 1,703.5022646849853,quiet
63 | 2,690.0348159187836,quiet
64 | 3,559.3293134401351,quiet
65 | 4,648.956330859979,quiet
66 | 5,760.8694408353344,quiet
67 | 6,634.0966619630598,quiet
68 | 7,546.7925481375175,quiet
69 | 8,566.4911137173777,quiet
70 | 9,740.919817230966,quiet
71 | 10,510.39084363861036,quiet
72 | 11,675.9628762758687,quiet
73 | 12,690.390420680253,quiet
74 | 13,470.9414386185548,quiet
75 | 14,538.1222812736981,quiet
76 | 15,699.2848880250974,quiet
77 | 16,728.9039802124327,quiet
78 | 17,608.2342853365585,quiet
79 | 18,522.3229983189107,quiet
80 | 19,710.4690836319501,quiet
81 | 20,741.1823013115974,quiet
82 | 21,616.3334939843643,quiet
83 | 22,653.9694841581988,quiet
84 | 23,548.7375822719548,quiet
85 | 24,557.3576907969893,quiet
86 | 25,601.227954453192,quiet
87 | 26,540.2857864841811,quiet
88 | 27,582.7192294263335,quiet
89 | 28,723.5802093830439,quiet
90 | 29,861.6144833054982,quiet
91 | 30,471.6262966180893,quiet
92 | 31,564.3148475871226,quiet
93 | 32,555.1126333287772,quiet
94 | 33,606.9952589235776,quiet
95 | 34,675.0338832718945,quiet
96 | 35,691.1234232444075,quiet
97 | 36,637.2189351288687,quiet
98 | 37,609.9032618028635,quiet
99 | 38,863.4952529014652,quiet
100 | 39,607.3640946508938,quiet
101 | 40,498.4512108036872,quiet
102 | 41,693.4334122097496,quiet
103 | 42,656.5827462872508,quiet
104 | 43,638.2753024085848,quiet
105 | 44,606.4986231965516,quiet
106 | 45,472.77542466686486,quiet
107 | 46,713.7745501762414,quiet
108 | 47,617.8291154696717,quiet
109 | 48,870.0942828923193,quiet
110 | 49,767.6300647629619,quiet
111 | 50,727.7734810890184,quiet
112 | 51,719.6531376754334,quiet
113 | 52,505.9851805365365,quiet
114 | 53,544.1387741249272,quiet
115 | 54,573.2569140958653,quiet
116 | 55,540.7880087792104,quiet
117 | 56,562.5756625441718,quiet
118 | 57,672.5129375773448,quiet
119 | 58,583.3081652538318,quiet
120 | 59,762.6003823679389,quiet
121 | 60,754.486405555377,quiet
122 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Jupyter notebooks
2 | In this folder you will find Jupyter Notebooks containing code examples for many of my blogposts ([https://www.marsja.se](https://www.marsja.se)). There are also notebooks containing the code for some of my Videos on my [YouTube Channel](https://www.youtube.com/channel/UCFHeY1aOt-Y4FLZeG_IpJCA). The main theme of the blog posts, right now, is data visualization, manipulation, and analysis using Python. For instance, you will find Pandas tutorials, Seaborn tutorials, and Statsmodels tutorials (e.g., Python ANOVA).
3 |
4 | ### Pandas DataFrame Tutorial: Jupyter Notebooks
5 |
6 | Here are different Notebooks containing the code examples for some of the Pandas Tutorials:
7 |
8 | - [Reversing Pandas Dataframe](https://github.com/marsja/jupyter/blob/master/reverse_pandas_dataframe.ipynb)
9 |
10 | - [Pandas Dataframe Tutorial: Working with Dataframes](https://github.com/marsja/jupyter/blob/master/Pandas_Dataframe_Tutorial_Example_Code.ipynb)
11 |
12 | - [Python Pandas JSON Tutorial](https://github.com/marsja/jupyter/blob/master/json_in_python_and_pandas.ipynb)
13 |
14 | - [Data Cleansing With Pandas and Pyjanitor](https://github.com/marsja/jupyter/blob/master/pyjanitor_data_cleaning_adding_columns_removing_columns_pandas.ipynb) - In this notebook code examples on how to delete missing values, remove empty columns, clean column names (i.e., rename columns) and so on can be found.
15 |
16 | - [Read SPSS files in Python](https://github.com/marsja/jupyter/blob/master/how_to_read_SPSS_sav_files_in_Python.ipynb) - Learn how to load .sav files into Pandas dataframes.
17 |
18 | - [Converting a Dictionary to a Pandas Dataframe](https://github.com/marsja/jupyter/blob/master/how_to_convert_a_dictionary_to_pandas_dataframe.ipynb)
19 | - [How to Print the Columns Names in a Pandas dataframe](https://github.com/marsja/jupyter/blob/master/how-to-get-column-names-Pandas-python.ipynb)
20 |
21 | ### Working with DataFrame
22 | Here you will find Jupyter notebooks, both R and Python right now, that focuses on how to work with data in specific ways.
23 |
24 | - [How to Reverse Code in R](https://github.com/marsja/jupyter/blob/master/R_Notebooks/reverse_coding_in_R.ipynb) - An R note book for learning how to reverse scores from a questionnaire using R and the package psych.
25 | -[Create Dummy Variables in Python with Pandas](https://github.com/marsja/jupyter/blob/master/pandas_get_dummies_how_to_create_dummy_variables.ipynb)
26 |
27 | ### Data Visualization in Python: Code Examples
28 | Note books for different Data Visualization Tutorials:
29 |
30 | - [Kernel Estimation, Cumulative Distribution Function, Delta Plot, & Conditional Accuracy Function](https://github.com/marsja/jupyter/blob/master/kde-cdf-delta-caf-plots.ipynb): Different data visualization techniques for response time data
31 |
32 | - [Python Data Visualization Tutorial: How to Create a Scatter Plot](https://github.com/marsja/jupyter/blob/master/Pandas%20Scatter%20Plot%20Tutorial.ipynb)
33 | - [How to Make Scatter Plots using Python](https://github.com/marsja/jupyter/blob/master/Seaborn_Scatterplot_Tutorial_Example_Code.ipynb) - Here we work with the following Seaborn methods: *scatterplot*, *regplot*, *lmpot*, and *pairplot*. We learn how to make scatter plots with regression lines, change the color and markers of Seaborn plots, rotate the ticks labels, and much more.
34 | - [Raincloud Plots in Python](https://github.com/marsja/jupyter/blob/master/Raincloud_Plots_in_Python.ipynb) Here's the example code from the Python data visualization tutorial on how to make raincloud plots in Python (YouTube Video)
35 | - [How to make a Histogram in Python with Pandas](https://github.com/marsja/jupyter/blob/master/how-to-make-histogram-in-pandas-python.ipynb)
36 |
37 |
38 | ### Data Visualization in R: Code examples
39 |
40 | - [Scatterplots in R using ggplot2](https://github.com/marsja/jupyter/blob/master/R_Notebooks/scatter_plot_in_R_tutorial.ipynb) - Notebook containing code examples on how to create scatter plots using ggplot2.
41 |
42 | ## Rpy2 Tutorial: Code Examples
43 | For some data analysis techniques we may want to use R. This because it may not yet be implemented in Python.
44 | Here are some Jupyter Notebooks for one Python package called Rpy2:
45 |
46 | - [Rpy2 & R-plots in Jupyter Notebooks](https://github.com/marsja/jupyter/blob/master/Rpy2%20and%20R%20plots%20in%20a%20Jupyter%20Notebook!.ipynb) (See the [YouTube Video](https://www.youtube.com/watch?v=RK-n78ZOXUg))
47 |
48 | - [Rpy2 Tutorial: Example](https://github.com/marsja/jupyter/blob/master/rpy2%20tutorial%20example%20code.ipynb)
49 |
50 | ## Python Data Analysis Tutorials
51 | In this section, we find the code examples, in the form of Jupyter Notebooks, for the Python data analysis tutorials;
52 |
53 | ### Descriptive Statistics in Python
54 | Here, there are some Jupyter Notebooks for carrying out summary statistics using
55 | Python, Pandas, Scipy, and other useful Python packages
56 |
57 | - [Descriptive Statistics in Python](https://github.com/marsja/jupyter/blob/master/descriptive_statistics_example_code.ipynb)
58 | - [Correlation Matrix in Python](https://github.com/marsja/jupyter/blob/master/correlation_matrix_in_python.ipynb)
59 |
60 | ### T-test
61 | - [Two-Sample T-test in Python](https://github.com/marsja/jupyter/blob/master/two_sample_t-test_Python.ipynb)
62 |
63 |
64 | ### ANOVA in Python and R
65 | Here we have Python ANOVA Notebooks. There is also one Notebook for carrying out ANOVA using R.
66 |
67 | #### Python ANOVA (Between Groups)
68 |
69 | - [One-Way ANOVA using Pingouin Stats](https://github.com/marsja/jupyter/blob/master/Python_ANOVA/pingouin-code-ANOVA-in-Python.ipynb)
70 |
71 | - [One-Way ANOVA using Scipy and Statsmodels](https://github.com/marsja/jupyter/blob/master/Python_ANOVA/One_Way_Python_ANOVA.ipynb)
72 |
73 | - [Two-Way ANOVA using Python and SciPy](https://github.com/marsja/jupyter/blob/master/Python_ANOVA/Two_Way_ANOVA_in_Python_Tutorial.ipynb)
74 |
75 | - [Two-Way ANOVA using Pingouin Stats](https://github.com/marsja/jupyter/blob/master/Python_ANOVA/Two_Way_ANOVA_in_Python_Tutorial.ipynb)
76 |
77 | - [Two-Way ANOVA using Statsmodels](https://github.com/marsja/jupyter/blob/master/Python_ANOVA/Python_ANOVA_Factorial_Using_Statsmodels.ipynb)
78 |
79 | #### Python ANOVA (Within Group)
80 | - [Repeated Measures ANOVA using Statsmodels](https://github.com/marsja/jupyter/blob/master/Python_ANOVA/Python%20repeated%20measures%20ANOVA.ipynb)
81 | - [Repeated Measures ANOVA in R: afex code example](https://github.com/marsja/jupyter/blob/master/Python_ANOVA/Repeated%20measures%20ANOVA%20using%20R%20and%20afex.ipynb)
82 |
83 | ### MANOVA in Python
84 | - [One-Way MANOVA using Statsmodels](https://github.com/marsja/jupyter/blob/master/MANOVA_Test_in_Python_Statsmodels_Example.ipynb) - This notebook contains the multivariate data analysis Multivariate Analysis of Variance (MANOVA)
85 |
86 | ### Other
87 | Tutorials, guides, and how tos (both Python and R) that doesn't fit into the above categories
88 |
89 | - [Get Max Value in Dictionary in Python](https://github.com/marsja/jupyter/blob/master/getting_the_highest_value_from_dictionary.ipynb)
90 |
91 | - [Convert HTML to Jupyter notebook](https://github.com/marsja/jupyter/blob/master/convert_html_jupyter_notebook_tutorial.ipynb) - Code to convert HTML (e.g., code within code tags) to .ipynb files that can be run
92 |
93 | - [Convert Float Array to Integer Array Python](https://github.com/marsja/jupyter/blob/master/convert_numpy_float_array_to_integer_array_Python.ipynb) - Code to convert a NumPy float Array to an Integer Array
94 |
--------------------------------------------------------------------------------
/R_Notebooks/reverse_coding_in_R.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "## Reverse Scoring Items in a Questionnaire\n",
8 | "In this notebook we will learn another methods for reverse coding of questionnaire items using the R statistical programming environment. Here you will learn reverse coding using a function from the psych package in R. This notebook is for the blog post [https://www.marsja.se/reverse-scoring-using-r/](https://www.marsja.se/reverse-scoring-using-r/) in which you will learn more about this."
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "metadata": {},
14 | "source": [
15 | "### Data to Reverse\n",
16 | "As example data, with some columns to reverse, we create a dataframe:"
17 | ]
18 | },
19 | {
20 | "cell_type": "code",
21 | "execution_count": 1,
22 | "metadata": {},
23 | "outputs": [
24 | {
25 | "data": {
26 | "text/html": [
27 | "\n",
28 | "Q1 | Q2 | Q3 | Q4 | Q5 | Q6 |
\n",
29 | "\n",
30 | "\t3 | 1 | 4 | 2 | 4 | 5 |
\n",
31 | "\t2 | 1 | 3 | 3 | 1 | 1 |
\n",
32 | "\t3 | 4 | 1 | 3 | 5 | 4 |
\n",
33 | "\t1 | 3 | 4 | 2 | 1 | 1 |
\n",
34 | "\t5 | 1 | 1 | 2 | 4 | 1 |
\n",
35 | "\t2 | 5 | 5 | 4 | 1 | 1 |
\n",
36 | "\n",
37 | "
\n"
38 | ],
39 | "text/latex": [
40 | "\\begin{tabular}{r|llllll}\n",
41 | " Q1 & Q2 & Q3 & Q4 & Q5 & Q6\\\\\n",
42 | "\\hline\n",
43 | "\t 3 & 1 & 4 & 2 & 4 & 5\\\\\n",
44 | "\t 2 & 1 & 3 & 3 & 1 & 1\\\\\n",
45 | "\t 3 & 4 & 1 & 3 & 5 & 4\\\\\n",
46 | "\t 1 & 3 & 4 & 2 & 1 & 1\\\\\n",
47 | "\t 5 & 1 & 1 & 2 & 4 & 1\\\\\n",
48 | "\t 2 & 5 & 5 & 4 & 1 & 1\\\\\n",
49 | "\\end{tabular}\n"
50 | ],
51 | "text/markdown": [
52 | "\n",
53 | "| Q1 | Q2 | Q3 | Q4 | Q5 | Q6 |\n",
54 | "|---|---|---|---|---|---|\n",
55 | "| 3 | 1 | 4 | 2 | 4 | 5 |\n",
56 | "| 2 | 1 | 3 | 3 | 1 | 1 |\n",
57 | "| 3 | 4 | 1 | 3 | 5 | 4 |\n",
58 | "| 1 | 3 | 4 | 2 | 1 | 1 |\n",
59 | "| 5 | 1 | 1 | 2 | 4 | 1 |\n",
60 | "| 2 | 5 | 5 | 4 | 1 | 1 |\n",
61 | "\n"
62 | ],
63 | "text/plain": [
64 | " Q1 Q2 Q3 Q4 Q5 Q6\n",
65 | "1 3 1 4 2 4 5 \n",
66 | "2 2 1 3 3 1 1 \n",
67 | "3 3 4 1 3 5 4 \n",
68 | "4 1 3 4 2 1 1 \n",
69 | "5 5 1 1 2 4 1 \n",
70 | "6 2 5 5 4 1 1 "
71 | ]
72 | },
73 | "metadata": {},
74 | "output_type": "display_data"
75 | }
76 | ],
77 | "source": [
78 | "df <- as.data.frame(replicate(6, replicate(100, sample(1:5,1))))\n",
79 | "\n",
80 | "colnames(df) <- c('Q1', 'Q2', 'Q3', 'Q4', 'Q5', 'Q6')\n",
81 | "\n",
82 | "head(df)"
83 | ]
84 | },
85 | {
86 | "cell_type": "markdown",
87 | "metadata": {},
88 | "source": [
89 | "### Working with the reverse.code function\n",
90 | "First, we are going to install the r-package called \"psych\" and then we are going to sue the reverse.code function to switch the coding of some items."
91 | ]
92 | },
93 | {
94 | "cell_type": "code",
95 | "execution_count": 2,
96 | "metadata": {},
97 | "outputs": [
98 | {
99 | "name": "stderr",
100 | "output_type": "stream",
101 | "text": [
102 | "Installing package into 'C:/Users/erima96/Documents/R/win-library/3.6'\n",
103 | "(as 'lib' is unspecified)\n"
104 | ]
105 | },
106 | {
107 | "name": "stdout",
108 | "output_type": "stream",
109 | "text": [
110 | "package 'psych' successfully unpacked and MD5 sums checked\n",
111 | "\n",
112 | "The downloaded binary packages are in\n",
113 | "\tC:\\Users\\erima96\\AppData\\Local\\Temp\\Rtmpea2YXQ\\downloaded_packages\n"
114 | ]
115 | }
116 | ],
117 | "source": [
118 | "install.packages(\"psych\")"
119 | ]
120 | },
121 | {
122 | "cell_type": "markdown",
123 | "metadata": {},
124 | "source": [
125 | "#### Reverse-Code Variables in R using reverse.code\n",
126 | "Now, we're ready to reverse the items using R:"
127 | ]
128 | },
129 | {
130 | "cell_type": "code",
131 | "execution_count": 3,
132 | "metadata": {},
133 | "outputs": [
134 | {
135 | "name": "stderr",
136 | "output_type": "stream",
137 | "text": [
138 | "Loading required package: psych\n",
139 | "Warning message:\n",
140 | "\"package 'psych' was built under R version 3.6.1\""
141 | ]
142 | },
143 | {
144 | "data": {
145 | "text/html": [
146 | "\n",
147 | "Q1 | Q2 | Q3 | Q4 | Q5 | Q6 |
\n",
148 | "\n",
149 | "\t3 | 1 | 4 | 2 | 4 | 5 |
\n",
150 | "\t2 | 1 | 3 | 3 | 1 | 1 |
\n",
151 | "\t3 | 4 | 1 | 3 | 5 | 4 |
\n",
152 | "\n",
153 | "
\n"
154 | ],
155 | "text/latex": [
156 | "\\begin{tabular}{r|llllll}\n",
157 | " Q1 & Q2 & Q3 & Q4 & Q5 & Q6\\\\\n",
158 | "\\hline\n",
159 | "\t 3 & 1 & 4 & 2 & 4 & 5\\\\\n",
160 | "\t 2 & 1 & 3 & 3 & 1 & 1\\\\\n",
161 | "\t 3 & 4 & 1 & 3 & 5 & 4\\\\\n",
162 | "\\end{tabular}\n"
163 | ],
164 | "text/markdown": [
165 | "\n",
166 | "| Q1 | Q2 | Q3 | Q4 | Q5 | Q6 |\n",
167 | "|---|---|---|---|---|---|\n",
168 | "| 3 | 1 | 4 | 2 | 4 | 5 |\n",
169 | "| 2 | 1 | 3 | 3 | 1 | 1 |\n",
170 | "| 3 | 4 | 1 | 3 | 5 | 4 |\n",
171 | "\n"
172 | ],
173 | "text/plain": [
174 | " Q1 Q2 Q3 Q4 Q5 Q6\n",
175 | "1 3 1 4 2 4 5 \n",
176 | "2 2 1 3 3 1 1 \n",
177 | "3 3 4 1 3 5 4 "
178 | ]
179 | },
180 | "metadata": {},
181 | "output_type": "display_data"
182 | },
183 | {
184 | "data": {
185 | "text/html": [
186 | "\n",
187 | "Q1 | Q2- | Q3- | Q4- | Q5 | Q6 |
\n",
188 | "\n",
189 | "\t3 | 5 | 2 | 4 | 4 | 5 |
\n",
190 | "\t2 | 5 | 3 | 3 | 1 | 1 |
\n",
191 | "\t3 | 2 | 5 | 3 | 5 | 4 |
\n",
192 | "\n",
193 | "
\n"
194 | ],
195 | "text/latex": [
196 | "\\begin{tabular}{llllll}\n",
197 | " Q1 & Q2- & Q3- & Q4- & Q5 & Q6\\\\\n",
198 | "\\hline\n",
199 | "\t 3 & 5 & 2 & 4 & 4 & 5\\\\\n",
200 | "\t 2 & 5 & 3 & 3 & 1 & 1\\\\\n",
201 | "\t 3 & 2 & 5 & 3 & 5 & 4\\\\\n",
202 | "\\end{tabular}\n"
203 | ],
204 | "text/markdown": [
205 | "\n",
206 | "| Q1 | Q2- | Q3- | Q4- | Q5 | Q6 |\n",
207 | "|---|---|---|---|---|---|\n",
208 | "| 3 | 5 | 2 | 4 | 4 | 5 |\n",
209 | "| 2 | 5 | 3 | 3 | 1 | 1 |\n",
210 | "| 3 | 2 | 5 | 3 | 5 | 4 |\n",
211 | "\n"
212 | ],
213 | "text/plain": [
214 | " Q1 Q2- Q3- Q4- Q5 Q6\n",
215 | "[1,] 3 5 2 4 4 5 \n",
216 | "[2,] 2 5 3 3 1 1 \n",
217 | "[3,] 3 2 5 3 5 4 "
218 | ]
219 | },
220 | "metadata": {},
221 | "output_type": "display_data"
222 | }
223 | ],
224 | "source": [
225 | "require(psych)\n",
226 | "\n",
227 | "\n",
228 | "#Reversing scores in columns 'Q2', 'Q3', and 'Q4'\n",
229 | "keys <- c(1, -1, -1, -1, 1, 1)\n",
230 | "\n",
231 | "new <- reverse.code(keys, df)\n",
232 | "df[1:3,]\n",
233 | "new[1:3,]"
234 | ]
235 | }
236 | ],
237 | "metadata": {
238 | "kernelspec": {
239 | "display_name": "R",
240 | "language": "R",
241 | "name": "ir"
242 | },
243 | "language_info": {
244 | "codemirror_mode": "r",
245 | "file_extension": ".r",
246 | "mimetype": "text/x-r-source",
247 | "name": "R",
248 | "pygments_lexer": "r",
249 | "version": "3.6.0"
250 | }
251 | },
252 | "nbformat": 4,
253 | "nbformat_minor": 2
254 | }
255 |
--------------------------------------------------------------------------------
/SimData/DF_NA_Janitor.csv:
--------------------------------------------------------------------------------
1 | ,Subject ID,First Name,Day,Age,Response Time,Gender,Miss\Col
2 | 0,1,John,Sixth,23,0.5627187141917855,0,
3 | 1,2,Billie,Sixth,22,,0,
4 | 2,3,Robert,Sixth,20,,0,
5 | 3,4,Don,Sixth,27,0.5229607643652396,0,
6 | 4,5,Joseph,Sixth,21,,0,
7 | 5,6,James,Sixth,25,0.4571030819121562,0,
8 | 6,7,Delbert,Sixth,26,,0,
9 | 7,8,Gary,Sixth,24,,0,
10 | 8,9,Scott,Sixth,27,,0,
11 | 9,10,Steve,Sixth,27,,0,
12 | 10,11,Frank,Sixth,18,,0,
13 | 11,12,Eric,Sixth,23,0.512687736538734,0,
14 | 12,13,Wendell,Sixth,27,,0,
15 | 13,14,James,Sixth,21,0.4517822116966478,0,
16 | 14,15,Paul,Sixth,20,,0,
17 | 15,16,Juan,Sixth,26,0.511309398445967,0,
18 | 16,17,Walter,Sixth,30,0.4876374026809741,0,
19 | 17,18,Richard,Sixth,23,0.5248170458806685,0,
20 | 18,19,Felix,Sixth,21,0.6719892697762015,0,
21 | 19,20,Andre,Sixth,21,0.4449211650987591,0,
22 | 20,21,Jeffrey,Sixth,26,0.4035001434778803,0,
23 | 21,22,Dave,Sixth,21,0.5538101525320848,0,
24 | 22,23,James,Sixth,29,0.3699416770202328,0,
25 | 23,24,Lemuel,Sixth,27,0.29449460162573504,0,
26 | 24,25,Tommy,Sixth,23,0.7125960371855942,0,
27 | 25,26,Carlos,Sixth,22,0.560689934295333,0,
28 | 26,27,Willie,Sixth,19,0.4426790378672592,0,
29 | 27,28,Joseph,Sixth,19,0.467343626114986,0,
30 | 28,29,Everette,Sixth,25,0.6954712644704699,0,
31 | 29,30,Marvin,Sixth,28,0.5338449267566893,0,
32 | 30,31,Javier,Sixth,30,0.5053801595683928,0,
33 | 31,32,Henry,Sixth,27,0.4386438165903696,0,
34 | 32,33,Danial,Sixth,19,0.443953740251032,0,
35 | 33,34,Nathan,Sixth,28,0.6104137051112386,0,
36 | 34,35,Ted,Sixth,29,0.4387538730184034,0,
37 | 35,36,Terry,Sixth,29,0.5828116958700524,0,
38 | 36,37,Steve,Sixth,28,0.4883025967736782,0,
39 | 37,38,Thomas,Sixth,24,0.5708048197461699,0,
40 | 38,39,Roger,Sixth,24,0.5903570754206436,0,
41 | 39,40,Mohammed,Sixth,26,0.5710369057808238,0,
42 | 40,41,Willie,Sixth,19,0.3545339060940288,0,
43 | 41,42,Kirk,Sixth,20,0.5931082193103651,0,
44 | 42,43,Michael,Sixth,20,0.4278974215619132,0,
45 | 43,44,Michael,Sixth,24,0.7627312850675907,0,
46 | 44,45,Eric,Sixth,20,0.3609865803366528,0,
47 | 45,46,Clarence,Sixth,19,0.2723403918403283,0,
48 | 46,47,Carlton,Sixth,23,0.4830924544938338,0,
49 | 47,48,Luis,Sixth,18,0.5978956173958363,0,
50 | 48,49,John,Sixth,30,0.4619513788658993,0,
51 | 49,50,Charles,Sixth,23,0.4479710238937036,0,
52 | 50,51,Larry,Sixth,30,0.6005101847929761,0,
53 | 51,52,Kennith,Sixth,22,0.6407673041409321,0,
54 | 52,53,John,Sixth,24,0.3166798757885672,0,
55 | 53,54,David,Sixth,20,0.5460591953743089,0,
56 | 54,55,Taylor,Sixth,20,0.4202468709201124,0,
57 | 55,56,Michael,Sixth,23,0.503040391617558,0,
58 | 56,57,Wesley,Sixth,21,0.5252979188424935,0,
59 | 57,58,Jack,Sixth,20,0.4456059188027668,0,
60 | 58,59,Drew,Sixth,22,0.4963736106787016,0,
61 | 59,60,Gary,Sixth,20,0.4475585006721042,0,
62 | 60,61,Robert,Sixth,26,0.433021422000792,0,
63 | 61,62,Charles,Sixth,29,0.4821278711793452,0,
64 | 62,63,Lawrence,Sixth,24,0.4054221747322013,0,
65 | 63,64,Billy,Sixth,25,0.5459887509348277,0,
66 | 64,65,Travis,Sixth,19,0.4482537127438954,0,
67 | 65,66,Kelly,Sixth,21,0.4947167997604914,0,
68 | 66,67,Johnnie,Sixth,23,0.4946061853363077,0,
69 | 67,68,Kenneth,Sixth,25,0.5652839716526309,0,
70 | 68,69,John,Sixth,19,0.34318786073239826,0,
71 | 69,70,Tony,Sixth,22,0.5142301178099664,0,
72 | 70,71,Salvatore,Sixth,30,0.5009923942795725,0,
73 | 71,72,Jack,Sixth,23,0.45398884881089896,0,
74 | 72,73,Jose,Sixth,28,0.4821673612287138,0,
75 | 73,74,John,Sixth,24,0.4722656940541789,0,
76 | 74,75,Richard,Sixth,18,0.6197608040669679,0,
77 | 75,76,Alan,Sixth,24,0.5335412407017036,0,
78 | 76,77,Edward,Sixth,30,0.5938522409655508,0,
79 | 77,78,Kenny,Sixth,30,0.41093795718540826,0,
80 | 78,79,Ian,Sixth,24,0.4959098187308255,0,
81 | 79,80,Brian,Sixth,29,0.5308543203711171,0,
82 | 80,81,Chad,Sixth,24,0.3173498201434641,0,
83 | 81,82,Lowell,Sixth,19,0.4248495932603885,0,
84 | 82,83,Jonathon,Sixth,24,0.4720788961850801,0,
85 | 83,84,Chester,Sixth,25,0.5393488384028237,0,
86 | 84,85,Harold,Sixth,28,0.4663681827526402,0,
87 | 85,86,Michael,Sixth,28,0.564364490050406,0,
88 | 86,87,James,Sixth,23,0.6633255597766218,0,
89 | 87,88,Charles,Sixth,18,0.6406938401660549,0,
90 | 88,89,Arthur,Sixth,21,0.6547226491561557,0,
91 | 89,90,Robert,Sixth,21,0.4650420803037942,0,
92 | 90,91,William,Sixth,30,0.5665519641804087,0,
93 | 91,92,Raymond,Sixth,25,0.6234046756685127,0,
94 | 92,93,Michael,Sixth,18,0.4054389794121322,0,
95 | 93,94,James,Sixth,27,0.4832817739075767,0,
96 | 94,95,James,Sixth,22,0.4623935581996443,0,
97 | 95,96,Jayson,Sixth,30,0.6183163685997498,0,
98 | 96,97,Don,Sixth,24,0.5733711927951894,0,
99 | 97,98,Joseph,Sixth,29,0.4873175435671538,0,
100 | 98,99,Paul,Sixth,22,0.688110681439846,0,
101 | 99,100,Roberto,Sixth,27,0.434629408779397,0,
102 | 100,101,Vanessa,Sixth,25,0.5111038562077044,1,
103 | 101,102,Alice,Sixth,23,0.4972015920269251,1,
104 | 102,103,Josephine,Sixth,27,0.6222947266717184,1,
105 | 103,104,Annie,Sixth,28,0.4729998858439837,1,
106 | 104,105,Veronica,Sixth,18,0.4992901882731911,1,
107 | 105,106,Elizabeth,Sixth,23,0.3895004576945725,1,
108 | 106,107,Marie,Sixth,29,0.4726102218311762,1,
109 | 107,108,Barbara,Sixth,20,0.465480091459964,1,
110 | 108,109,Donna,Sixth,29,0.4993503685979966,1,
111 | 109,110,Shannon,Sixth,29,0.5368721241098889,1,
112 | 110,111,Miranda,Sixth,28,0.5454813912263198,1,
113 | 111,112,Brianna,Sixth,22,0.452065775094302,1,
114 | 112,113,Willie,Sixth,25,0.39099589041022575,1,
115 | 113,114,Rachel,Sixth,21,0.4983379588870162,1,
116 | 114,115,Maria,Sixth,21,0.6115318473116368,1,
117 | 115,116,Barbara,Sixth,23,0.3798873826666749,1,
118 | 116,117,Mattie,Sixth,26,0.6024999519165927,1,
119 | 117,118,Barbara,Sixth,22,0.5365787533599118,1,
120 | 118,119,Nicole,Sixth,22,0.3719803042196256,1,
121 | 119,120,Kimberly,Sixth,25,0.3900251680666901,1,
122 | 120,121,Maya,Sixth,27,0.5012211361474402,1,
123 | 121,122,Tammy,Sixth,21,0.5900732351352194,1,
124 | 122,123,Marilyn,Sixth,24,0.5111264805624623,1,
125 | 123,124,Karen,Sixth,26,0.5719529873473642,1,
126 | 124,125,Sherri,Sixth,20,0.5344687407956776,1,
127 | 125,126,Lisa,Sixth,22,0.4285293196734672,1,
128 | 126,127,Ruth,Sixth,23,0.4141276409539065,1,
129 | 127,128,Beatriz,Sixth,22,0.580891276391413,1,
130 | 128,129,Wilma,Sixth,25,0.41292421225187,1,
131 | 129,130,Alyssa,Sixth,30,0.5691490519310829,1,
132 | 130,131,Samira,Sixth,24,0.5983022594122839,1,
133 | 131,132,Danielle,Sixth,26,0.6119405745912091,1,
134 | 132,133,Rachal,Sixth,30,0.4502686799797943,1,
135 | 133,134,Candice,Sixth,30,0.4958386248306951,1,
136 | 134,135,Yvonne,Sixth,30,0.5707502520010675,1,
137 | 135,136,Lorraine,Sixth,19,0.4435393854940667,1,
138 | 136,137,Minnie,Sixth,25,0.4677632036651698,1,
139 | 137,138,Katherine,Sixth,27,0.4042972425845818,1,
140 | 138,139,Teresa,Sixth,24,0.6421220921833651,1,
141 | 139,140,Suzanne,Sixth,21,0.5422837619955311,1,
142 | 140,141,Maria,Sixth,30,0.39329161255034334,1,
143 | 141,142,Laura,Sixth,21,0.5375873055372921,1,
144 | 142,143,Georgette,Sixth,20,0.392442361268742,1,
145 | 143,144,Marcia,Sixth,19,0.5829517088661433,1,
146 | 144,145,Susie,Sixth,21,0.4800001615471727,1,
147 | 145,146,Deanna,Sixth,18,0.4949746972751772,1,
148 | 146,147,Harriet,Sixth,22,0.4651620538037444,1,
149 | 147,148,Laverne,Sixth,23,0.21852240343463564,1,
150 | 148,149,Evelyn,Sixth,27,0.5256522259273075,1,
151 | 149,150,Jessica,Sixth,22,0.4626756113213673,1,
152 | 150,151,Mary,Sixth,28,0.5971399636524906,1,
153 | 151,152,Maurine,Sixth,23,0.3862647280799457,1,
154 | 152,153,Millicent,Sixth,21,0.41539557943222,1,
155 | 153,154,Twila,Sixth,22,0.4434321643778448,1,
156 | 154,155,Kim,Sixth,27,0.5783197667230191,1,
157 | 155,156,Elida,Sixth,27,0.4595253229609275,1,
158 | 156,157,Robin,Sixth,21,0.406894345549398,1,
159 | 157,158,Katrina,Sixth,23,0.574720890916179,1,
160 | 158,159,Christina,Sixth,23,0.4471695747522068,1,
161 | 159,160,Ashley,Sixth,21,0.3658777537307304,1,
162 | 160,161,Katherine,Sixth,19,0.5443646468409017,1,
163 | 161,162,Stella,Sixth,18,0.3811908133421368,1,
164 | 162,163,Lillian,Sixth,29,0.5827037820459395,1,
165 | 163,164,Megan,Sixth,26,0.6712950290615973,1,
166 | 164,165,Martha,Sixth,30,0.5999854536629398,1,
167 | 165,166,Tamra,Sixth,22,0.5426967026078454,1,
168 | 166,167,Barbara,Sixth,23,0.5266036117738924,1,
169 | 167,168,Helen,Sixth,23,0.3827441141401961,1,
170 | 168,169,Delores,Sixth,20,0.5125524640036196,1,
171 | 169,170,Cassandra,Sixth,19,0.5445426304713614,1,
172 | 170,171,Shawn,Sixth,20,0.5415660559256122,1,
173 | 171,172,Diane,Sixth,23,0.31139991061482986,1,
174 | 172,173,Lena,Sixth,26,0.4249519659560316,1,
175 | 173,174,Renee,Sixth,29,0.4841828832501326,1,
176 | 174,175,Linda,Sixth,20,0.4267961009247867,1,
177 | 175,176,Brooke,Sixth,21,0.5665981844310021,1,
178 | 176,177,Angela,Sixth,24,0.4877586266951791,1,
179 | 177,178,Bridget,Sixth,21,0.4569162017466531,1,
180 | 178,179,Betty,Sixth,24,0.534980963105169,1,
181 | 179,180,Lola,Sixth,30,0.5152307543228434,1,
182 | 180,181,Debra,Sixth,21,0.40830678550869137,1,
183 | 181,182,Debra,Sixth,29,0.6112997110674216,1,
184 | 182,183,Diana,Sixth,19,0.41919925141276265,1,
185 | 183,184,Mary,Sixth,28,0.5751100677634319,1,
186 | 184,185,Mable,Sixth,23,0.4904157402345066,1,
187 | 185,186,Jeanne,Sixth,30,0.3049416329938862,1,
188 | 186,187,Sharon,Sixth,26,0.4326362856392755,1,
189 | 187,188,Lucia,Sixth,18,0.3895300791317597,1,
190 | 188,189,Kimberly,Sixth,24,0.5165075984515924,1,
191 | 189,190,Crystal,Sixth,19,0.3799857945139376,1,
192 | 190,191,Esther,Sixth,25,0.3598757061536821,1,
193 | 191,192,Della,Sixth,28,0.5487373450086704,1,
194 | 192,193,Joy,Sixth,20,0.5711191682655571,1,
195 | 193,194,Benita,Sixth,24,0.5812982298969092,1,
196 | 194,195,Doris,Sixth,18,0.5366558449616664,1,
197 | 195,196,Francisca,Sixth,27,0.4946573817954197,1,
198 | 196,197,Nia,Sixth,20,0.4877552435335766,1,
199 | 197,198,Christina,Sixth,29,0.4994693732595509,1,
200 | 198,199,Marta,Sixth,26,0.4278674824865973,1,
201 | 199,200,Julia,Sixth,25,0.4036795449925428,1,
202 |
--------------------------------------------------------------------------------
/SimData/FifthDayData.csv:
--------------------------------------------------------------------------------
1 | ID,Name,Day,Age,Response,Gender
2 | 1,John,Fifth,23,0.45373296299551025,0
3 | 2,Billie,Fifth,22,0.25735967887773664,0
4 | 3,Robert,Fifth,20,0.4433932346537235,0
5 | 4,Don,Fifth,27,0.42359205860097654,0
6 | 5,Joseph,Fifth,21,0.5713553855245412,0
7 | 6,James,Fifth,25,0.5577922012116372,0
8 | 7,Delbert,Fifth,26,0.3864622293050664,0
9 | 8,Gary,Fifth,24,0.5153159712551302,0
10 | 9,Scott,Fifth,27,0.2608930105995283,0
11 | 10,Steve,Fifth,27,0.29787530176726096,0
12 | 11,Frank,Fifth,18,0.391164156182838,0
13 | 12,Eric,Fifth,23,0.3443803944464628,0
14 | 13,Wendell,Fifth,27,0.4718281632921879,0
15 | 14,James,Fifth,21,0.42329786553819276,0
16 | 15,Paul,Fifth,20,0.37005230002598904,0
17 | 16,Juan,Fifth,26,0.5482615795824617,0
18 | 17,Walter,Fifth,30,0.4078488401454476,0
19 | 18,Richard,Fifth,23,0.33040885620460014,0
20 | 19,Felix,Fifth,21,0.2984548110759699,0
21 | 20,Andre,Fifth,21,0.3909972498950065,0
22 | 21,Jeffrey,Fifth,26,0.3631563436461584,0
23 | 22,Dave,Fifth,21,0.5704688745841278,0
24 | 23,James,Fifth,29,0.4407569614878759,0
25 | 24,Lemuel,Fifth,27,0.38596293335978743,0
26 | 25,Tommy,Fifth,23,0.45112653223105575,0
27 | 26,Carlos,Fifth,22,0.15410928303560273,0
28 | 27,Willie,Fifth,19,0.5882946272402179,0
29 | 28,Joseph,Fifth,19,0.4247489157849507,0
30 | 29,Everette,Fifth,25,0.45523146646140916,0
31 | 30,Marvin,Fifth,28,0.47087038435588485,0
32 | 31,Javier,Fifth,30,0.4146333217905207,0
33 | 32,Henry,Fifth,27,0.31609695570870033,0
34 | 33,Danial,Fifth,19,0.264539801115214,0
35 | 34,Nathan,Fifth,28,0.5666326248666169,0
36 | 35,Ted,Fifth,29,0.5287781654016532,0
37 | 36,Terry,Fifth,29,0.36008779146029807,0
38 | 37,Steve,Fifth,28,0.5850967105206835,0
39 | 38,Thomas,Fifth,24,0.5162706106184481,0
40 | 39,Roger,Fifth,24,0.4955931497351022,0
41 | 40,Mohammed,Fifth,26,0.41962238823216436,0
42 | 41,Willie,Fifth,19,0.40660584948701456,0
43 | 42,Kirk,Fifth,20,0.4633507452412541,0
44 | 43,Michael,Fifth,20,0.36464576791707587,0
45 | 44,Michael,Fifth,24,0.40822625873812274,0
46 | 45,Eric,Fifth,20,0.3179800518993563,0
47 | 46,Clarence,Fifth,19,0.41276014968064084,0
48 | 47,Carlton,Fifth,23,0.562001710432737,0
49 | 48,Luis,Fifth,18,0.37575671519751463,0
50 | 49,John,Fifth,30,0.6060155241568055,0
51 | 50,Charles,Fifth,23,0.4446042669400221,0
52 | 51,Larry,Fifth,30,0.476775463243786,0
53 | 52,Kennith,Fifth,22,0.5923523157152484,0
54 | 53,John,Fifth,24,0.3390585493824726,0
55 | 54,David,Fifth,20,0.4781668404046945,0
56 | 55,Taylor,Fifth,20,0.492333496151051,0
57 | 56,Michael,Fifth,23,0.34266879155444324,0
58 | 57,Wesley,Fifth,21,0.3515514977803989,0
59 | 58,Jack,Fifth,20,0.3892373050444082,0
60 | 59,Drew,Fifth,22,0.3877900960755566,0
61 | 60,Gary,Fifth,20,0.42373411732156624,0
62 | 61,Robert,Fifth,26,0.6122989930008309,0
63 | 62,Charles,Fifth,29,0.6327686900361291,0
64 | 63,Lawrence,Fifth,24,0.36769426520741866,0
65 | 64,Billy,Fifth,25,0.4897967438724099,0
66 | 65,Travis,Fifth,19,0.6208327670153768,0
67 | 66,Kelly,Fifth,21,0.3287750096989917,0
68 | 67,Johnnie,Fifth,23,0.41601403953084176,0
69 | 68,Kenneth,Fifth,25,0.48914909502465487,0
70 | 69,John,Fifth,19,0.4456015577066491,0
71 | 70,Tony,Fifth,22,0.5207180043199187,0
72 | 71,Salvatore,Fifth,30,0.22485131718846757,0
73 | 72,Jack,Fifth,23,0.3594394287686675,0
74 | 73,Jose,Fifth,28,0.5363833335252903,0
75 | 74,John,Fifth,24,0.3541826308817994,0
76 | 75,Richard,Fifth,18,0.411699628897766,0
77 | 76,Alan,Fifth,24,0.4660467706949534,0
78 | 77,Edward,Fifth,30,0.34060550470610557,0
79 | 78,Kenny,Fifth,30,0.5871353488381698,0
80 | 79,Ian,Fifth,24,0.4535917248314896,0
81 | 80,Brian,Fifth,29,0.33011807668462756,0
82 | 81,Chad,Fifth,24,0.24663482374588327,0
83 | 82,Lowell,Fifth,19,0.4274773441395094,0
84 | 83,Jonathon,Fifth,24,0.25606595975845636,0
85 | 84,Chester,Fifth,25,0.46493919042049,0
86 | 85,Harold,Fifth,28,0.513422887269918,0
87 | 86,Michael,Fifth,28,0.39755884644820494,0
88 | 87,James,Fifth,23,0.6530244663048064,0
89 | 88,Charles,Fifth,18,0.1343891209496355,0
90 | 89,Arthur,Fifth,21,0.54633648215451,0
91 | 90,Robert,Fifth,21,0.4861460227694609,0
92 | 91,William,Fifth,30,0.3921417409441929,0
93 | 92,Raymond,Fifth,25,0.4480145122152221,0
94 | 93,Michael,Fifth,18,0.2895322553535547,0
95 | 94,James,Fifth,27,0.5556006321756004,0
96 | 95,James,Fifth,22,0.33298530592953224,0
97 | 96,Jayson,Fifth,30,0.5534706204383935,0
98 | 97,Don,Fifth,24,0.39111908973703835,0
99 | 98,Joseph,Fifth,29,0.47608883985035955,0
100 | 99,Paul,Fifth,22,0.4917814435596114,0
101 | 100,Roberto,Fifth,27,0.2864726835208149,0
102 | 101,Vanessa,Fifth,25,0.32240557084025245,1
103 | 102,Alice,Fifth,23,0.3873879922664489,1
104 | 103,Josephine,Fifth,27,0.3282728336658397,1
105 | 104,Annie,Fifth,28,0.4292354851015388,1
106 | 105,Veronica,Fifth,18,0.5130379751461882,1
107 | 106,Elizabeth,Fifth,23,0.6200069282960567,1
108 | 107,Marie,Fifth,29,0.5305440752698534,1
109 | 108,Barbara,Fifth,20,0.581230146764938,1
110 | 109,Donna,Fifth,29,0.5061012557099496,1
111 | 110,Shannon,Fifth,29,0.4003092993878432,1
112 | 111,Miranda,Fifth,28,0.3966579923998648,1
113 | 112,Brianna,Fifth,22,0.4044932844985302,1
114 | 113,Willie,Fifth,25,0.4219500163027606,1
115 | 114,Rachel,Fifth,21,0.46196010449935565,1
116 | 115,Maria,Fifth,21,0.38262880190792703,1
117 | 116,Barbara,Fifth,23,0.6605327215948222,1
118 | 117,Mattie,Fifth,26,0.37250587324950624,1
119 | 118,Barbara,Fifth,22,0.45841455222613636,1
120 | 119,Nicole,Fifth,22,0.48452856368709596,1
121 | 120,Kimberly,Fifth,25,0.464215401871029,1
122 | 121,Maya,Fifth,27,0.49119148321320344,1
123 | 122,Tammy,Fifth,21,0.49778661180359024,1
124 | 123,Marilyn,Fifth,24,0.2746206067171284,1
125 | 124,Karen,Fifth,26,0.34019782551435035,1
126 | 125,Sherri,Fifth,20,0.5539030801360647,1
127 | 126,Lisa,Fifth,22,0.3267431688611382,1
128 | 127,Ruth,Fifth,23,0.3979089673009449,1
129 | 128,Beatriz,Fifth,22,0.34650654217180127,1
130 | 129,Wilma,Fifth,25,0.5879885635010755,1
131 | 130,Alyssa,Fifth,30,0.3110453360265941,1
132 | 131,Samira,Fifth,24,0.4966999425640137,1
133 | 132,Danielle,Fifth,26,0.491412904918258,1
134 | 133,Rachal,Fifth,30,0.3745208278233588,1
135 | 134,Candice,Fifth,30,0.4693496343903035,1
136 | 135,Yvonne,Fifth,30,0.5183966208486301,1
137 | 136,Lorraine,Fifth,19,0.22125380850421314,1
138 | 137,Minnie,Fifth,25,0.4017895402362002,1
139 | 138,Katherine,Fifth,27,0.3111834904558713,1
140 | 139,Teresa,Fifth,24,0.4792189919803444,1
141 | 140,Suzanne,Fifth,21,0.29194342172276844,1
142 | 141,Maria,Fifth,30,0.3549492541600732,1
143 | 142,Laura,Fifth,21,0.5095189627626867,1
144 | 143,Georgette,Fifth,20,0.3185687995452637,1
145 | 144,Marcia,Fifth,19,0.4910251050280039,1
146 | 145,Susie,Fifth,21,0.3780270031378614,1
147 | 146,Deanna,Fifth,18,0.4875711143677395,1
148 | 147,Harriet,Fifth,22,0.43594402443028124,1
149 | 148,Laverne,Fifth,23,0.3811352664825599,1
150 | 149,Evelyn,Fifth,27,0.5694106941686307,1
151 | 150,Jessica,Fifth,22,0.40757243385825653,1
152 | 151,Mary,Fifth,28,0.2728677075643247,1
153 | 152,Maurine,Fifth,23,0.20588619260498486,1
154 | 153,Millicent,Fifth,21,0.38524610641214285,1
155 | 154,Twila,Fifth,22,0.34390712901976256,1
156 | 155,Kim,Fifth,27,0.3666235979455144,1
157 | 156,Elida,Fifth,27,0.28124188528000604,1
158 | 157,Robin,Fifth,21,0.4640272080065959,1
159 | 158,Katrina,Fifth,23,0.35779050163100723,1
160 | 159,Christina,Fifth,23,0.36892688462174056,1
161 | 160,Ashley,Fifth,21,0.22507669643361258,1
162 | 161,Katherine,Fifth,19,0.4042319267681077,1
163 | 162,Stella,Fifth,18,0.4436891065207518,1
164 | 163,Lillian,Fifth,29,0.527608507368262,1
165 | 164,Megan,Fifth,26,0.40422084740205466,1
166 | 165,Martha,Fifth,30,0.3591413524101543,1
167 | 166,Tamra,Fifth,22,0.19236452938490317,1
168 | 167,Barbara,Fifth,23,0.32698403622155636,1
169 | 168,Helen,Fifth,23,0.44411393579508646,1
170 | 169,Delores,Fifth,20,0.5139960240547053,1
171 | 170,Cassandra,Fifth,19,0.42676143420152535,1
172 | 171,Shawn,Fifth,20,0.5378242547602982,1
173 | 172,Diane,Fifth,23,0.4125629736011582,1
174 | 173,Lena,Fifth,26,0.5246445275778342,1
175 | 174,Renee,Fifth,29,0.486077194665446,1
176 | 175,Linda,Fifth,20,0.5951980718027695,1
177 | 176,Brooke,Fifth,21,0.3795568408245569,1
178 | 177,Angela,Fifth,24,0.2999944261889942,1
179 | 178,Bridget,Fifth,21,0.4964390907069347,1
180 | 179,Betty,Fifth,24,0.28765443889862635,1
181 | 180,Lola,Fifth,30,0.5549320942544064,1
182 | 181,Debra,Fifth,21,0.4119099845598452,1
183 | 182,Debra,Fifth,29,0.4681995090686376,1
184 | 183,Diana,Fifth,19,0.47562711490226456,1
185 | 184,Mary,Fifth,28,0.3889339115570191,1
186 | 185,Mable,Fifth,23,0.46852170434057483,1
187 | 186,Jeanne,Fifth,30,0.3453372689435743,1
188 | 187,Sharon,Fifth,26,0.4852001046690406,1
189 | 188,Lucia,Fifth,18,0.4097657078090752,1
190 | 189,Kimberly,Fifth,24,0.3905678965833977,1
191 | 190,Crystal,Fifth,19,0.27434052289694083,1
192 | 191,Esther,Fifth,25,0.4463634593916836,1
193 | 192,Della,Fifth,28,0.1970736352537894,1
194 | 193,Joy,Fifth,20,0.4042112850508673,1
195 | 194,Benita,Fifth,24,0.3406655139226564,1
196 | 195,Doris,Fifth,18,0.4074515634660152,1
197 | 196,Francisca,Fifth,27,0.260849048442554,1
198 | 197,Nia,Fifth,20,0.4311054263973579,1
199 | 198,Christina,Fifth,29,0.2313163263033352,1
200 | 199,Marta,Fifth,26,0.42494782392298514,1
201 | 200,Julia,Fifth,25,0.2804744065097556,1
202 |
--------------------------------------------------------------------------------
/SimData/FifthDayData.dta:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/FifthDayData.dta
--------------------------------------------------------------------------------
/SimData/FirstDayData.csv:
--------------------------------------------------------------------------------
1 | ID,Name,Day,Age,Response,Gender
2 | 1,John,First,23,0.10897646124769803,0
3 | 2,Billie,First,22,0.038128151990411085,0
4 | 3,Robert,First,20,0.09470610657553061,0
5 | 4,Don,First,27,0.05763294955454182,0
6 | 5,Joseph,First,21,-0.17539269887811798,0
7 | 6,James,First,25,-0.028602783349194333,0
8 | 7,Delbert,First,26,0.030843062854017972,0
9 | 8,Gary,First,24,0.024686720860376106,0
10 | 9,Scott,First,27,-0.09831861219062818,0
11 | 10,Steve,First,27,-0.14282220080393762,0
12 | 11,Frank,First,18,-0.014448817873279195,0
13 | 12,Eric,First,23,0.11771528270325082,0
14 | 13,Wendell,First,27,0.11174575427756667,0
15 | 14,James,First,21,0.2814516262378201,0
16 | 15,Paul,First,20,0.034195710771368765,0
17 | 16,Juan,First,26,-0.0722285882641357,0
18 | 17,Walter,First,30,-0.046102937603886,0
19 | 18,Richard,First,23,0.06643682866597922,0
20 | 19,Felix,First,21,0.0589116112546299,0
21 | 20,Andre,First,21,0.05222609553945291,0
22 | 21,Jeffrey,First,26,-0.02202696908730138,0
23 | 22,Dave,First,21,-0.005605375859106315,0
24 | 23,James,First,29,-0.013009178763003683,0
25 | 24,Lemuel,First,27,-0.11241145401820794,0
26 | 25,Tommy,First,23,0.32418689762983804,0
27 | 26,Carlos,First,22,-0.05907451376366729,0
28 | 27,Willie,First,19,-0.06228547589623609,0
29 | 28,Joseph,First,19,0.18942228042387974,0
30 | 29,Everette,First,25,0.15980703110673106,0
31 | 30,Marvin,First,28,-0.030924208119599547,0
32 | 31,Javier,First,30,0.021551906357636118,0
33 | 32,Henry,First,27,-0.10883151725633844,0
34 | 33,Danial,First,19,0.1053417842300837,0
35 | 34,Nathan,First,28,-0.17895650906830057,0
36 | 35,Ted,First,29,-0.06071792752737895,0
37 | 36,Terry,First,29,0.045849020081357696,0
38 | 37,Steve,First,28,0.1824338878631989,0
39 | 38,Thomas,First,24,-0.04827982576667503,0
40 | 39,Roger,First,24,0.059559147825473446,0
41 | 40,Mohammed,First,26,-0.08094014331772345,0
42 | 41,Willie,First,19,-0.0691148568662879,0
43 | 42,Kirk,First,20,0.05914574022000262,0
44 | 43,Michael,First,20,-0.022022254298127486,0
45 | 44,Michael,First,24,0.07193417138914365,0
46 | 45,Eric,First,20,0.05536544839013602,0
47 | 46,Clarence,First,19,-0.12805228614852646,0
48 | 47,Carlton,First,23,0.057149533566528514,0
49 | 48,Luis,First,18,-0.11454446385116518,0
50 | 49,John,First,30,0.13888615554804137,0
51 | 50,Charles,First,23,-0.14812458423672684,0
52 | 51,Larry,First,30,-0.02370466303778498,0
53 | 52,Kennith,First,22,-0.13267816075931302,0
54 | 53,John,First,24,-0.05732636987241994,0
55 | 54,David,First,20,0.013012222406338633,0
56 | 55,Taylor,First,20,0.0037723135378083987,0
57 | 56,Michael,First,23,-0.11152904530045722,0
58 | 57,Wesley,First,21,-0.14765049910397657,0
59 | 58,Jack,First,20,0.0032421121217859673,0
60 | 59,Drew,First,22,-0.016197944161304004,0
61 | 60,Gary,First,20,0.1370971918776753,0
62 | 61,Robert,First,26,0.15778176925861376,0
63 | 62,Charles,First,29,-0.01703129547062726,0
64 | 63,Lawrence,First,24,0.10135507383230624,0
65 | 64,Billy,First,25,-0.05282943731014372,0
66 | 65,Travis,First,19,0.1665841829704349,0
67 | 66,Kelly,First,21,0.14152342255967254,0
68 | 67,Johnnie,First,23,0.03939829993269143,0
69 | 68,Kenneth,First,25,0.048702155177848414,0
70 | 69,John,First,19,0.10129436143297517,0
71 | 70,Tony,First,22,0.04928507591825808,0
72 | 71,Salvatore,First,30,0.181671822039305,0
73 | 72,Jack,First,23,-0.006638061006444093,0
74 | 73,Jose,First,28,0.020006118468201998,0
75 | 74,John,First,24,0.10880510496421424,0
76 | 75,Richard,First,18,-0.028965415058133978,0
77 | 76,Alan,First,24,0.19807095792769464,0
78 | 77,Edward,First,30,-0.09816041125958858,0
79 | 78,Kenny,First,30,-0.14121243364562486,0
80 | 79,Ian,First,24,-0.09267577361215006,0
81 | 80,Brian,First,29,0.0528982869623768,0
82 | 81,Chad,First,24,-0.20611141164925267,0
83 | 82,Lowell,First,19,-0.09492193715251877,0
84 | 83,Jonathon,First,24,0.10426417987279323,0
85 | 84,Chester,First,25,0.02917845392100705,0
86 | 85,Harold,First,28,-0.10464339014509766,0
87 | 86,Michael,First,28,-0.22976186113024336,0
88 | 87,James,First,23,0.06599296225043418,0
89 | 88,Charles,First,18,-0.00770720688238659,0
90 | 89,Arthur,First,21,0.15647973857320152,0
91 | 90,Robert,First,21,-0.1008416098308173,0
92 | 91,William,First,30,-0.011471030348396286,0
93 | 92,Raymond,First,25,0.0358306313660028,0
94 | 93,Michael,First,18,-0.1573367334927374,0
95 | 94,James,First,27,-0.10881507582071125,0
96 | 95,James,First,22,0.10508456243185203,0
97 | 96,Jayson,First,30,-0.10424170887262513,0
98 | 97,Don,First,24,-0.029247041139167703,0
99 | 98,Joseph,First,29,0.155309215083431,0
100 | 99,Paul,First,22,0.07013265275096053,0
101 | 100,Roberto,First,27,0.026080687595462004,0
102 | 101,Vanessa,First,25,-0.017763560454362774,1
103 | 102,Alice,First,23,-0.001140851661521542,1
104 | 103,Josephine,First,27,-0.09051008748414019,1
105 | 104,Annie,First,28,-0.0806197374583108,1
106 | 105,Veronica,First,18,0.07520860620917572,1
107 | 106,Elizabeth,First,23,0.060764503691354756,1
108 | 107,Marie,First,29,-0.03248236859726127,1
109 | 108,Barbara,First,20,0.0805670954402633,1
110 | 109,Donna,First,29,-0.21509492079707038,1
111 | 110,Shannon,First,29,-0.11568825899678066,1
112 | 111,Miranda,First,28,0.27262273365544515,1
113 | 112,Brianna,First,22,-0.12157350002724797,1
114 | 113,Willie,First,25,-0.029383437877644643,1
115 | 114,Rachel,First,21,0.22589854969656253,1
116 | 115,Maria,First,21,-0.23326506347347103,1
117 | 116,Barbara,First,23,0.054250916242555874,1
118 | 117,Mattie,First,26,0.13571426230076428,1
119 | 118,Barbara,First,22,-0.1965747561218218,1
120 | 119,Nicole,First,22,-0.1565476051347261,1
121 | 120,Kimberly,First,25,-0.09994651609813442,1
122 | 121,Maya,First,27,0.09358297511595336,1
123 | 122,Tammy,First,21,-0.004390824850492973,1
124 | 123,Marilyn,First,24,0.032457210771900696,1
125 | 124,Karen,First,26,-0.13459263434055646,1
126 | 125,Sherri,First,20,-0.015193550828251407,1
127 | 126,Lisa,First,22,-0.11347691288648531,1
128 | 127,Ruth,First,23,0.055865984819626915,1
129 | 128,Beatriz,First,22,0.06997910592959743,1
130 | 129,Wilma,First,25,-0.04945112990449184,1
131 | 130,Alyssa,First,30,-0.07662399865590172,1
132 | 131,Samira,First,24,0.01034151377865173,1
133 | 132,Danielle,First,26,0.04229332559630411,1
134 | 133,Rachal,First,30,0.1677837456534348,1
135 | 134,Candice,First,30,-0.05871712288473457,1
136 | 135,Yvonne,First,30,0.040667927715105884,1
137 | 136,Lorraine,First,19,-0.04440857235066666,1
138 | 137,Minnie,First,25,-0.021730420116221182,1
139 | 138,Katherine,First,27,0.03037502423027079,1
140 | 139,Teresa,First,24,-0.02726928364144648,1
141 | 140,Suzanne,First,21,-0.009089649633290826,1
142 | 141,Maria,First,30,0.03463482580551039,1
143 | 142,Laura,First,21,-0.04226816547776138,1
144 | 143,Georgette,First,20,0.15897675687859592,1
145 | 144,Marcia,First,19,0.06897554414780849,1
146 | 145,Susie,First,21,0.1091095129994258,1
147 | 146,Deanna,First,18,-0.15674172844015577,1
148 | 147,Harriet,First,22,-0.02334785971245261,1
149 | 148,Laverne,First,23,0.10551696917046237,1
150 | 149,Evelyn,First,27,-0.057886042613544055,1
151 | 150,Jessica,First,22,0.08216600943648418,1
152 | 151,Mary,First,28,0.20884647980984578,1
153 | 152,Maurine,First,23,-0.24112352659559627,1
154 | 153,Millicent,First,21,-0.015946727093739968,1
155 | 154,Twila,First,22,0.0306250320842089,1
156 | 155,Kim,First,27,0.024625046774610856,1
157 | 156,Elida,First,27,0.17342848177522874,1
158 | 157,Robin,First,21,0.21903069953082382,1
159 | 158,Katrina,First,23,0.03298483022471462,1
160 | 159,Christina,First,23,0.07357397675690168,1
161 | 160,Ashley,First,21,0.04239173563270782,1
162 | 161,Katherine,First,19,-0.03775795234057512,1
163 | 162,Stella,First,18,-0.07385708993679112,1
164 | 163,Lillian,First,29,0.00790146379428482,1
165 | 164,Megan,First,26,-0.03618388871549306,1
166 | 165,Martha,First,30,0.0909534592227706,1
167 | 166,Tamra,First,22,0.1550290612700058,1
168 | 167,Barbara,First,23,-0.0037969093865728946,1
169 | 168,Helen,First,23,0.023837324461743453,1
170 | 169,Delores,First,20,0.19452822900602051,1
171 | 170,Cassandra,First,19,-0.03859146362994846,1
172 | 171,Shawn,First,20,0.02893942004208489,1
173 | 172,Diane,First,23,-0.004807480384385637,1
174 | 173,Lena,First,26,-0.11684041991234509,1
175 | 174,Renee,First,29,0.049313895573948045,1
176 | 175,Linda,First,20,-0.03467974730723032,1
177 | 176,Brooke,First,21,0.008791157544219533,1
178 | 177,Angela,First,24,-0.023278936243868825,1
179 | 178,Bridget,First,21,0.09784220620296205,1
180 | 179,Betty,First,24,0.04852421377717461,1
181 | 180,Lola,First,30,-0.14883838016728165,1
182 | 181,Debra,First,21,-0.05556686524254254,1
183 | 182,Debra,First,29,0.01691808229559538,1
184 | 183,Diana,First,19,0.015041292008131533,1
185 | 184,Mary,First,28,0.00015435690567660825,1
186 | 185,Mable,First,23,0.13725388155749396,1
187 | 186,Jeanne,First,30,0.0724776055865148,1
188 | 187,Sharon,First,26,-0.134736692561259,1
189 | 188,Lucia,First,18,0.14554371530227145,1
190 | 189,Kimberly,First,24,-0.022699486096346328,1
191 | 190,Crystal,First,19,-0.2172864602215451,1
192 | 191,Esther,First,25,0.14421628760613936,1
193 | 192,Della,First,28,-0.043263232094207564,1
194 | 193,Joy,First,20,0.13578750453237243,1
195 | 194,Benita,First,24,-0.04105369294321446,1
196 | 195,Doris,First,18,0.026836633003138967,1
197 | 196,Francisca,First,27,0.11984932990251254,1
198 | 197,Nia,First,20,-0.02537296023962914,1
199 | 198,Christina,First,29,0.12829774867260377,1
200 | 199,Marta,First,26,-0.10920587961951617,1
201 | 200,Julia,First,25,0.07251166220746179,1
202 |
--------------------------------------------------------------------------------
/SimData/FirstDayData.dta:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/FirstDayData.dta
--------------------------------------------------------------------------------
/SimData/FirstDayData.sav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/FirstDayData.sav
--------------------------------------------------------------------------------
/SimData/FourthDayData.csv:
--------------------------------------------------------------------------------
1 | ID,Name,Day,Age,Response,Gender
2 | 1,John,Fourth,23,0.34856612838091916,0
3 | 2,Billie,Fourth,22,0.377046691834601,0
4 | 3,Robert,Fourth,20,0.2740935513422149,0
5 | 4,Don,Fourth,27,0.41566529975653754,0
6 | 5,Joseph,Fourth,21,0.5030523481793486,0
7 | 6,James,Fourth,25,0.6686813449276366,0
8 | 7,Delbert,Fourth,26,0.32226165937671875,0
9 | 8,Gary,Fourth,24,0.3916982393821837,0
10 | 9,Scott,Fourth,27,0.4201650459243951,0
11 | 10,Steve,Fourth,27,0.46766195412379336,0
12 | 11,Frank,Fourth,18,0.45898345582961153,0
13 | 12,Eric,Fourth,23,0.5479525573253385,0
14 | 13,Wendell,Fourth,27,0.3702964118645945,0
15 | 14,James,Fourth,21,0.35552427393773767,0
16 | 15,Paul,Fourth,20,0.4442014199214026,0
17 | 16,Juan,Fourth,26,0.3882999629906536,0
18 | 17,Walter,Fourth,30,0.32327223135129324,0
19 | 18,Richard,Fourth,23,0.3807334038765816,0
20 | 19,Felix,Fourth,21,0.300021601125039,0
21 | 20,Andre,Fourth,21,0.24178556581323463,0
22 | 21,Jeffrey,Fourth,26,0.3714903851225104,0
23 | 22,Dave,Fourth,21,0.41190612914430863,0
24 | 23,James,Fourth,29,0.43130600893768073,0
25 | 24,Lemuel,Fourth,27,0.34373427693833364,0
26 | 25,Tommy,Fourth,23,0.23971982401038122,0
27 | 26,Carlos,Fourth,22,0.497806755010102,0
28 | 27,Willie,Fourth,19,0.39412611375948853,0
29 | 28,Joseph,Fourth,19,0.319986738223184,0
30 | 29,Everette,Fourth,25,0.45940447673553014,0
31 | 30,Marvin,Fourth,28,0.37466522857887347,0
32 | 31,Javier,Fourth,30,0.28361624097694305,0
33 | 32,Henry,Fourth,27,0.2282030327489958,0
34 | 33,Danial,Fourth,19,0.3700762354109632,0
35 | 34,Nathan,Fourth,28,0.30766871044542515,0
36 | 35,Ted,Fourth,29,0.38120949919504077,0
37 | 36,Terry,Fourth,29,0.228549364957517,0
38 | 37,Steve,Fourth,28,0.5881994334164636,0
39 | 38,Thomas,Fourth,24,0.3856087348237665,0
40 | 39,Roger,Fourth,24,0.4426257213709829,0
41 | 40,Mohammed,Fourth,26,0.5443393058458627,0
42 | 41,Willie,Fourth,19,0.43791619951565414,0
43 | 42,Kirk,Fourth,20,0.3819867435847643,0
44 | 43,Michael,Fourth,20,0.42109534434084045,0
45 | 44,Michael,Fourth,24,0.28189379993491365,0
46 | 45,Eric,Fourth,20,0.34070465640095043,0
47 | 46,Clarence,Fourth,19,0.2763980207226272,0
48 | 47,Carlton,Fourth,23,0.5623088734650281,0
49 | 48,Luis,Fourth,18,0.31446654813259506,0
50 | 49,John,Fourth,30,0.4206397408356436,0
51 | 50,Charles,Fourth,23,0.42186817356912676,0
52 | 51,Larry,Fourth,30,0.20116435342623212,0
53 | 52,Kennith,Fourth,22,0.3788108610614584,0
54 | 53,John,Fourth,24,0.3591879104497363,0
55 | 54,David,Fourth,20,0.42387253343350634,0
56 | 55,Taylor,Fourth,20,0.3877910286193835,0
57 | 56,Michael,Fourth,23,0.14573824756388323,0
58 | 57,Wesley,Fourth,21,0.26104082671581763,0
59 | 58,Jack,Fourth,20,0.3668368751077959,0
60 | 59,Drew,Fourth,22,0.2243892795312477,0
61 | 60,Gary,Fourth,20,0.40632791512689026,0
62 | 61,Robert,Fourth,26,0.32293935462529455,0
63 | 62,Charles,Fourth,29,0.41404518665490153,0
64 | 63,Lawrence,Fourth,24,0.5737876910026611,0
65 | 64,Billy,Fourth,25,0.25672692751851567,0
66 | 65,Travis,Fourth,19,0.38254645695292794,0
67 | 66,Kelly,Fourth,21,0.24976670227368256,0
68 | 67,Johnnie,Fourth,23,0.4264878390845841,0
69 | 68,Kenneth,Fourth,25,0.37648218114143644,0
70 | 69,John,Fourth,19,0.38565431812985124,0
71 | 70,Tony,Fourth,22,0.5227296520871594,0
72 | 71,Salvatore,Fourth,30,0.353377740999313,0
73 | 72,Jack,Fourth,23,0.46564639107520617,0
74 | 73,Jose,Fourth,28,0.47926400031478067,0
75 | 74,John,Fourth,24,0.4936502087816483,0
76 | 75,Richard,Fourth,18,0.4916099257615466,0
77 | 76,Alan,Fourth,24,0.4680982718409892,0
78 | 77,Edward,Fourth,30,0.40179927912901464,0
79 | 78,Kenny,Fourth,30,0.5056629886231886,0
80 | 79,Ian,Fourth,24,0.3373081263161796,0
81 | 80,Brian,Fourth,29,0.3858918012764013,0
82 | 81,Chad,Fourth,24,0.3987378043345847,0
83 | 82,Lowell,Fourth,19,0.2775041697675872,0
84 | 83,Jonathon,Fourth,24,0.39468734802669114,0
85 | 84,Chester,Fourth,25,0.4846246091428523,0
86 | 85,Harold,Fourth,28,0.34391998854946815,0
87 | 86,Michael,Fourth,28,0.4396240563324852,0
88 | 87,James,Fourth,23,0.45944933276198535,0
89 | 88,Charles,Fourth,18,0.29736071948922327,0
90 | 89,Arthur,Fourth,21,0.3874817488644538,0
91 | 90,Robert,Fourth,21,0.27578311464729943,0
92 | 91,William,Fourth,30,0.41595100404870416,0
93 | 92,Raymond,Fourth,25,0.3319726165000659,0
94 | 93,Michael,Fourth,18,0.39970325921640615,0
95 | 94,James,Fourth,27,0.4470893622287899,0
96 | 95,James,Fourth,22,0.33236527804458765,0
97 | 96,Jayson,Fourth,30,0.18488006562531636,0
98 | 97,Don,Fourth,24,0.3563785233895987,0
99 | 98,Joseph,Fourth,29,0.31149720683196674,0
100 | 99,Paul,Fourth,22,0.34441795534048913,0
101 | 100,Roberto,Fourth,27,0.4024739479704382,0
102 | 101,Vanessa,Fourth,25,0.23084437245185016,1
103 | 102,Alice,Fourth,23,0.44482043300938245,1
104 | 103,Josephine,Fourth,27,0.35954439960470286,1
105 | 104,Annie,Fourth,28,0.4037623214927178,1
106 | 105,Veronica,Fourth,18,0.4616276208105221,1
107 | 106,Elizabeth,Fourth,23,0.2199452017950949,1
108 | 107,Marie,Fourth,29,0.5734469964253677,1
109 | 108,Barbara,Fourth,20,0.3452579184219273,1
110 | 109,Donna,Fourth,29,0.5101356717558677,1
111 | 110,Shannon,Fourth,29,0.4870772079053962,1
112 | 111,Miranda,Fourth,28,0.2809131292528238,1
113 | 112,Brianna,Fourth,22,0.36882768469414967,1
114 | 113,Willie,Fourth,25,0.2817898088297147,1
115 | 114,Rachel,Fourth,21,0.45570969255802446,1
116 | 115,Maria,Fourth,21,0.29253676504995946,1
117 | 116,Barbara,Fourth,23,0.29014639234537465,1
118 | 117,Mattie,Fourth,26,0.49931575605614054,1
119 | 118,Barbara,Fourth,22,0.38570075922708813,1
120 | 119,Nicole,Fourth,22,0.2550366801374672,1
121 | 120,Kimberly,Fourth,25,0.3346951068347461,1
122 | 121,Maya,Fourth,27,0.24178187224065179,1
123 | 122,Tammy,Fourth,21,0.346438019080797,1
124 | 123,Marilyn,Fourth,24,0.3324888987819297,1
125 | 124,Karen,Fourth,26,0.3395216825531733,1
126 | 125,Sherri,Fourth,20,0.34838312574813657,1
127 | 126,Lisa,Fourth,22,0.4975986556009898,1
128 | 127,Ruth,Fourth,23,0.3828730342575669,1
129 | 128,Beatriz,Fourth,22,0.45053342936626845,1
130 | 129,Wilma,Fourth,25,0.3236413786582404,1
131 | 130,Alyssa,Fourth,30,0.2657136686251437,1
132 | 131,Samira,Fourth,24,0.34298357210466884,1
133 | 132,Danielle,Fourth,26,0.2863774316486247,1
134 | 133,Rachal,Fourth,30,0.41931657931420674,1
135 | 134,Candice,Fourth,30,0.36197239860701375,1
136 | 135,Yvonne,Fourth,30,0.3396216205916616,1
137 | 136,Lorraine,Fourth,19,0.27536841443696525,1
138 | 137,Minnie,Fourth,25,0.2985729886390672,1
139 | 138,Katherine,Fourth,27,0.2033364988509848,1
140 | 139,Teresa,Fourth,24,0.2448128277571272,1
141 | 140,Suzanne,Fourth,21,0.46807416665804347,1
142 | 141,Maria,Fourth,30,0.29282989317411895,1
143 | 142,Laura,Fourth,21,0.40339958868431114,1
144 | 143,Georgette,Fourth,20,0.36845262157262815,1
145 | 144,Marcia,Fourth,19,0.32458549991370844,1
146 | 145,Susie,Fourth,21,0.36242385900246166,1
147 | 146,Deanna,Fourth,18,0.40347215560240307,1
148 | 147,Harriet,Fourth,22,0.12973622725941192,1
149 | 148,Laverne,Fourth,23,0.30074102785678153,1
150 | 149,Evelyn,Fourth,27,0.4318597243272191,1
151 | 150,Jessica,Fourth,22,0.24812710439459718,1
152 | 151,Mary,Fourth,28,0.4333845377349502,1
153 | 152,Maurine,Fourth,23,0.4110557673415939,1
154 | 153,Millicent,Fourth,21,0.27794261486105876,1
155 | 154,Twila,Fourth,22,0.4933606186011485,1
156 | 155,Kim,Fourth,27,0.3404094801363547,1
157 | 156,Elida,Fourth,27,0.40927430370998996,1
158 | 157,Robin,Fourth,21,0.32046152782851534,1
159 | 158,Katrina,Fourth,23,0.3531386689255173,1
160 | 159,Christina,Fourth,23,0.6109102060868049,1
161 | 160,Ashley,Fourth,21,0.4424437398309864,1
162 | 161,Katherine,Fourth,19,0.39826806720311575,1
163 | 162,Stella,Fourth,18,0.40856616373834237,1
164 | 163,Lillian,Fourth,29,0.17652259079012125,1
165 | 164,Megan,Fourth,26,0.270331784882343,1
166 | 165,Martha,Fourth,30,0.34443714107087897,1
167 | 166,Tamra,Fourth,22,0.40994029988195163,1
168 | 167,Barbara,Fourth,23,0.2252279642307069,1
169 | 168,Helen,Fourth,23,0.26291192088024945,1
170 | 169,Delores,Fourth,20,0.310787486782465,1
171 | 170,Cassandra,Fourth,19,0.3303517030285769,1
172 | 171,Shawn,Fourth,20,0.29707082871681184,1
173 | 172,Diane,Fourth,23,0.32431689740668906,1
174 | 173,Lena,Fourth,26,0.5990319613217561,1
175 | 174,Renee,Fourth,29,0.2757123422532532,1
176 | 175,Linda,Fourth,20,0.35600521709710803,1
177 | 176,Brooke,Fourth,21,0.3999378764760127,1
178 | 177,Angela,Fourth,24,0.34673102607993733,1
179 | 178,Bridget,Fourth,21,0.3271018468493462,1
180 | 179,Betty,Fourth,24,0.45402369893409966,1
181 | 180,Lola,Fourth,30,0.3103734801925171,1
182 | 181,Debra,Fourth,21,0.3816986053701544,1
183 | 182,Debra,Fourth,29,0.2818684237762095,1
184 | 183,Diana,Fourth,19,0.45616208444402906,1
185 | 184,Mary,Fourth,28,0.45392687542382165,1
186 | 185,Mable,Fourth,23,0.529700547264452,1
187 | 186,Jeanne,Fourth,30,0.2776421885175293,1
188 | 187,Sharon,Fourth,26,0.5174364814954343,1
189 | 188,Lucia,Fourth,18,0.2624853479564313,1
190 | 189,Kimberly,Fourth,24,0.49863004523501453,1
191 | 190,Crystal,Fourth,19,0.4031701809858398,1
192 | 191,Esther,Fourth,25,0.3893473345654394,1
193 | 192,Della,Fourth,28,0.28463410281318635,1
194 | 193,Joy,Fourth,20,0.25740728380089895,1
195 | 194,Benita,Fourth,24,0.377863984758393,1
196 | 195,Doris,Fourth,18,0.21280721727446952,1
197 | 196,Francisca,Fourth,27,0.480961160636833,1
198 | 197,Nia,Fourth,20,0.4193608044272194,1
199 | 198,Christina,Fourth,29,0.27334737234146533,1
200 | 199,Marta,Fourth,26,0.37572150100438095,1
201 | 200,Julia,Fourth,25,0.15106477452894013,1
202 |
--------------------------------------------------------------------------------
/SimData/MissingData.csv:
--------------------------------------------------------------------------------
1 | ,ID,Name,Day,Age,Response,Gender
2 | 0,1,John,Sixth,23,0.5627187141917855,0
3 | 1,2,Billie,Sixth,22,Not Available,0
4 | 2,3,Robert,Sixth,20,Not Available,0
5 | 3,4,Don,Sixth,27,0.5229607643652396,0
6 | 4,5,Joseph,Sixth,21,Not Available,0
7 | 5,6,James,Sixth,25,0.4571030819121562,0
8 | 6,7,Delbert,Sixth,26,Not Available,0
9 | 7,8,Gary,Sixth,24,Not Available,0
10 | 8,9,Scott,Sixth,27,Not Available,0
11 | 9,10,Steve,Sixth,27,Not Available,0
12 | 10,11,Frank,Sixth,18,Not Available,0
13 | 11,12,Eric,Sixth,23,0.512687736538734,0
14 | 12,13,Wendell,Sixth,27,Not Available,0
15 | 13,14,James,Sixth,21,0.4517822116966478,0
16 | 14,15,Paul,Sixth,20,Not Available,0
17 | 15,16,Juan,Sixth,26,0.511309398445967,0
18 | 16,17,Walter,Sixth,30,0.4876374026809741,0
19 | 17,18,Richard,Sixth,23,0.5248170458806685,0
20 | 18,19,Felix,Sixth,21,0.6719892697762015,0
21 | 19,20,Andre,Sixth,21,0.4449211650987591,0
22 | 20,21,Jeffrey,Sixth,26,0.4035001434778803,0
23 | 21,22,Dave,Sixth,21,0.5538101525320848,0
24 | 22,23,James,Sixth,29,0.3699416770202328,0
25 | 23,24,Lemuel,Sixth,27,0.29449460162573504,0
26 | 24,25,Tommy,Sixth,23,0.7125960371855942,0
27 | 25,26,Carlos,Sixth,22,0.560689934295333,0
28 | 26,27,Willie,Sixth,19,0.4426790378672592,0
29 | 27,28,Joseph,Sixth,19,0.467343626114986,0
30 | 28,29,Everette,Sixth,25,0.6954712644704699,0
31 | 29,30,Marvin,Sixth,28,0.5338449267566893,0
32 | 30,31,Javier,Sixth,30,0.5053801595683928,0
33 | 31,32,Henry,Sixth,27,0.4386438165903696,0
34 | 32,33,Danial,Sixth,19,0.443953740251032,0
35 | 33,34,Nathan,Sixth,28,0.6104137051112386,0
36 | 34,35,Ted,Sixth,29,0.4387538730184034,0
37 | 35,36,Terry,Sixth,29,0.5828116958700524,0
38 | 36,37,Steve,Sixth,28,0.4883025967736782,0
39 | 37,38,Thomas,Sixth,24,0.5708048197461699,0
40 | 38,39,Roger,Sixth,24,0.5903570754206436,0
41 | 39,40,Mohammed,Sixth,26,0.5710369057808238,0
42 | 40,41,Willie,Sixth,19,0.3545339060940288,0
43 | 41,42,Kirk,Sixth,20,0.5931082193103651,0
44 | 42,43,Michael,Sixth,20,0.4278974215619132,0
45 | 43,44,Michael,Sixth,24,0.7627312850675907,0
46 | 44,45,Eric,Sixth,20,0.3609865803366528,0
47 | 45,46,Clarence,Sixth,19,0.2723403918403283,0
48 | 46,47,Carlton,Sixth,23,0.4830924544938338,0
49 | 47,48,Luis,Sixth,18,0.5978956173958363,0
50 | 48,49,John,Sixth,30,0.4619513788658993,0
51 | 49,50,Charles,Sixth,23,0.4479710238937036,0
52 | 50,51,Larry,Sixth,30,0.6005101847929761,0
53 | 51,52,Kennith,Sixth,22,0.6407673041409321,0
54 | 52,53,John,Sixth,24,0.3166798757885672,0
55 | 53,54,David,Sixth,20,0.5460591953743089,0
56 | 54,55,Taylor,Sixth,20,0.4202468709201124,0
57 | 55,56,Michael,Sixth,23,0.503040391617558,0
58 | 56,57,Wesley,Sixth,21,0.5252979188424935,0
59 | 57,58,Jack,Sixth,20,0.4456059188027668,0
60 | 58,59,Drew,Sixth,22,0.4963736106787016,0
61 | 59,60,Gary,Sixth,20,0.4475585006721042,0
62 | 60,61,Robert,Sixth,26,0.433021422000792,0
63 | 61,62,Charles,Sixth,29,0.4821278711793452,0
64 | 62,63,Lawrence,Sixth,24,0.4054221747322013,0
65 | 63,64,Billy,Sixth,25,0.5459887509348277,0
66 | 64,65,Travis,Sixth,19,0.4482537127438954,0
67 | 65,66,Kelly,Sixth,21,0.4947167997604914,0
68 | 66,67,Johnnie,Sixth,23,0.4946061853363077,0
69 | 67,68,Kenneth,Sixth,25,0.5652839716526309,0
70 | 68,69,John,Sixth,19,0.34318786073239826,0
71 | 69,70,Tony,Sixth,22,0.5142301178099664,0
72 | 70,71,Salvatore,Sixth,30,0.5009923942795725,0
73 | 71,72,Jack,Sixth,23,0.45398884881089896,0
74 | 72,73,Jose,Sixth,28,0.4821673612287138,0
75 | 73,74,John,Sixth,24,0.4722656940541789,0
76 | 74,75,Richard,Sixth,18,0.6197608040669679,0
77 | 75,76,Alan,Sixth,24,0.5335412407017036,0
78 | 76,77,Edward,Sixth,30,0.5938522409655508,0
79 | 77,78,Kenny,Sixth,30,0.41093795718540826,0
80 | 78,79,Ian,Sixth,24,0.4959098187308255,0
81 | 79,80,Brian,Sixth,29,0.5308543203711171,0
82 | 80,81,Chad,Sixth,24,0.3173498201434641,0
83 | 81,82,Lowell,Sixth,19,0.4248495932603885,0
84 | 82,83,Jonathon,Sixth,24,0.4720788961850801,0
85 | 83,84,Chester,Sixth,25,0.5393488384028237,0
86 | 84,85,Harold,Sixth,28,0.4663681827526402,0
87 | 85,86,Michael,Sixth,28,0.564364490050406,0
88 | 86,87,James,Sixth,23,0.6633255597766218,0
89 | 87,88,Charles,Sixth,18,0.6406938401660549,0
90 | 88,89,Arthur,Sixth,21,0.6547226491561557,0
91 | 89,90,Robert,Sixth,21,0.4650420803037942,0
92 | 90,91,William,Sixth,30,0.5665519641804087,0
93 | 91,92,Raymond,Sixth,25,0.6234046756685127,0
94 | 92,93,Michael,Sixth,18,0.4054389794121322,0
95 | 93,94,James,Sixth,27,0.4832817739075767,0
96 | 94,95,James,Sixth,22,0.4623935581996443,0
97 | 95,96,Jayson,Sixth,30,0.6183163685997498,0
98 | 96,97,Don,Sixth,24,0.5733711927951894,0
99 | 97,98,Joseph,Sixth,29,0.4873175435671538,0
100 | 98,99,Paul,Sixth,22,0.688110681439846,0
101 | 99,100,Roberto,Sixth,27,0.434629408779397,0
102 | 100,101,Vanessa,Sixth,25,0.5111038562077044,1
103 | 101,102,Alice,Sixth,23,0.4972015920269251,1
104 | 102,103,Josephine,Sixth,27,0.6222947266717184,1
105 | 103,104,Annie,Sixth,28,0.4729998858439837,1
106 | 104,105,Veronica,Sixth,18,0.4992901882731911,1
107 | 105,106,Elizabeth,Sixth,23,0.3895004576945725,1
108 | 106,107,Marie,Sixth,29,0.4726102218311762,1
109 | 107,108,Barbara,Sixth,20,0.465480091459964,1
110 | 108,109,Donna,Sixth,29,0.4993503685979966,1
111 | 109,110,Shannon,Sixth,29,0.5368721241098889,1
112 | 110,111,Miranda,Sixth,28,0.5454813912263198,1
113 | 111,112,Brianna,Sixth,22,0.452065775094302,1
114 | 112,113,Willie,Sixth,25,0.39099589041022575,1
115 | 113,114,Rachel,Sixth,21,0.4983379588870162,1
116 | 114,115,Maria,Sixth,21,0.6115318473116368,1
117 | 115,116,Barbara,Sixth,23,0.3798873826666749,1
118 | 116,117,Mattie,Sixth,26,0.6024999519165927,1
119 | 117,118,Barbara,Sixth,22,0.5365787533599118,1
120 | 118,119,Nicole,Sixth,22,0.3719803042196256,1
121 | 119,120,Kimberly,Sixth,25,0.3900251680666901,1
122 | 120,121,Maya,Sixth,27,0.5012211361474402,1
123 | 121,122,Tammy,Sixth,21,0.5900732351352194,1
124 | 122,123,Marilyn,Sixth,24,0.5111264805624623,1
125 | 123,124,Karen,Sixth,26,0.5719529873473642,1
126 | 124,125,Sherri,Sixth,20,0.5344687407956776,1
127 | 125,126,Lisa,Sixth,22,0.4285293196734672,1
128 | 126,127,Ruth,Sixth,23,0.4141276409539065,1
129 | 127,128,Beatriz,Sixth,22,0.580891276391413,1
130 | 128,129,Wilma,Sixth,25,0.41292421225187,1
131 | 129,130,Alyssa,Sixth,30,0.5691490519310829,1
132 | 130,131,Samira,Sixth,24,0.5983022594122839,1
133 | 131,132,Danielle,Sixth,26,0.6119405745912091,1
134 | 132,133,Rachal,Sixth,30,0.4502686799797943,1
135 | 133,134,Candice,Sixth,30,0.4958386248306951,1
136 | 134,135,Yvonne,Sixth,30,0.5707502520010675,1
137 | 135,136,Lorraine,Sixth,19,0.4435393854940667,1
138 | 136,137,Minnie,Sixth,25,0.4677632036651698,1
139 | 137,138,Katherine,Sixth,27,0.4042972425845818,1
140 | 138,139,Teresa,Sixth,24,0.6421220921833651,1
141 | 139,140,Suzanne,Sixth,21,0.5422837619955311,1
142 | 140,141,Maria,Sixth,30,0.39329161255034334,1
143 | 141,142,Laura,Sixth,21,0.5375873055372921,1
144 | 142,143,Georgette,Sixth,20,0.392442361268742,1
145 | 143,144,Marcia,Sixth,19,0.5829517088661433,1
146 | 144,145,Susie,Sixth,21,0.4800001615471727,1
147 | 145,146,Deanna,Sixth,18,0.4949746972751772,1
148 | 146,147,Harriet,Sixth,22,0.4651620538037444,1
149 | 147,148,Laverne,Sixth,23,0.21852240343463564,1
150 | 148,149,Evelyn,Sixth,27,0.5256522259273075,1
151 | 149,150,Jessica,Sixth,22,0.4626756113213673,1
152 | 150,151,Mary,Sixth,28,0.5971399636524906,1
153 | 151,152,Maurine,Sixth,23,0.3862647280799457,1
154 | 152,153,Millicent,Sixth,21,0.41539557943222,1
155 | 153,154,Twila,Sixth,22,0.4434321643778448,1
156 | 154,155,Kim,Sixth,27,0.5783197667230191,1
157 | 155,156,Elida,Sixth,27,0.4595253229609275,1
158 | 156,157,Robin,Sixth,21,0.406894345549398,1
159 | 157,158,Katrina,Sixth,23,0.574720890916179,1
160 | 158,159,Christina,Sixth,23,0.4471695747522068,1
161 | 159,160,Ashley,Sixth,21,0.3658777537307304,1
162 | 160,161,Katherine,Sixth,19,0.5443646468409017,1
163 | 161,162,Stella,Sixth,18,0.3811908133421368,1
164 | 162,163,Lillian,Sixth,29,0.5827037820459395,1
165 | 163,164,Megan,Sixth,26,0.6712950290615973,1
166 | 164,165,Martha,Sixth,30,0.5999854536629398,1
167 | 165,166,Tamra,Sixth,22,0.5426967026078454,1
168 | 166,167,Barbara,Sixth,23,0.5266036117738924,1
169 | 167,168,Helen,Sixth,23,0.3827441141401961,1
170 | 168,169,Delores,Sixth,20,0.5125524640036196,1
171 | 169,170,Cassandra,Sixth,19,0.5445426304713614,1
172 | 170,171,Shawn,Sixth,20,0.5415660559256122,1
173 | 171,172,Diane,Sixth,23,0.31139991061482986,1
174 | 172,173,Lena,Sixth,26,0.4249519659560316,1
175 | 173,174,Renee,Sixth,29,0.4841828832501326,1
176 | 174,175,Linda,Sixth,20,0.4267961009247867,1
177 | 175,176,Brooke,Sixth,21,0.5665981844310021,1
178 | 176,177,Angela,Sixth,24,0.4877586266951791,1
179 | 177,178,Bridget,Sixth,21,0.4569162017466531,1
180 | 178,179,Betty,Sixth,24,0.534980963105169,1
181 | 179,180,Lola,Sixth,30,0.5152307543228434,1
182 | 180,181,Debra,Sixth,21,0.40830678550869137,1
183 | 181,182,Debra,Sixth,29,0.6112997110674216,1
184 | 182,183,Diana,Sixth,19,0.41919925141276265,1
185 | 183,184,Mary,Sixth,28,0.5751100677634319,1
186 | 184,185,Mable,Sixth,23,0.4904157402345066,1
187 | 185,186,Jeanne,Sixth,30,0.3049416329938862,1
188 | 186,187,Sharon,Sixth,26,0.4326362856392755,1
189 | 187,188,Lucia,Sixth,18,0.3895300791317597,1
190 | 188,189,Kimberly,Sixth,24,0.5165075984515924,1
191 | 189,190,Crystal,Sixth,19,0.3799857945139376,1
192 | 190,191,Esther,Sixth,25,0.3598757061536821,1
193 | 191,192,Della,Sixth,28,0.5487373450086704,1
194 | 192,193,Joy,Sixth,20,0.5711191682655571,1
195 | 193,194,Benita,Sixth,24,0.5812982298969092,1
196 | 194,195,Doris,Sixth,18,0.5366558449616664,1
197 | 195,196,Francisca,Sixth,27,0.4946573817954197,1
198 | 196,197,Nia,Sixth,20,0.4877552435335766,1
199 | 197,198,Christina,Sixth,29,0.4994693732595509,1
200 | 198,199,Marta,Sixth,26,0.4278674824865973,1
201 | 199,200,Julia,Sixth,25,0.4036795449925428,1
202 |
--------------------------------------------------------------------------------
/SimData/NewFifthDayData.dta:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/NewFifthDayData.dta
--------------------------------------------------------------------------------
/SimData/SecondDayData.csv:
--------------------------------------------------------------------------------
1 | ID,Name,Day,Age,Response,Gender
2 | 1,John,Second,23,0.47822531504260707,0
3 | 2,Billie,Second,22,0.0029382753674734863,0
4 | 3,Robert,Second,20,0.12093402273657071,0
5 | 4,Don,Second,27,0.12828046963419742,0
6 | 5,Joseph,Second,21,0.2973830583071586,0
7 | 6,James,Second,25,0.2513542799820886,0
8 | 7,Delbert,Second,26,0.1466088272262309,0
9 | 8,Gary,Second,24,0.32510380256426413,0
10 | 9,Scott,Second,27,0.26625948649179465,0
11 | 10,Steve,Second,27,0.3154149257193317,0
12 | 11,Frank,Second,18,0.2748699932350343,0
13 | 12,Eric,Second,23,0.1382858842203156,0
14 | 13,Wendell,Second,27,0.2500004515092824,0
15 | 14,James,Second,21,0.13995013589836036,0
16 | 15,Paul,Second,20,0.2687264168534552,0
17 | 16,Juan,Second,26,-0.16580057356484224,0
18 | 17,Walter,Second,30,0.32830966478067386,0
19 | 18,Richard,Second,23,0.0959963811339728,0
20 | 19,Felix,Second,21,0.10472906285667613,0
21 | 20,Andre,Second,21,0.14336077546911746,0
22 | 21,Jeffrey,Second,26,0.17670106328943663,0
23 | 22,Dave,Second,21,0.15960216640255903,0
24 | 23,James,Second,29,-0.07992788053560806,0
25 | 24,Lemuel,Second,27,0.20484350712407703,0
26 | 25,Tommy,Second,23,0.3183249390042885,0
27 | 26,Carlos,Second,22,0.3623935896829245,0
28 | 27,Willie,Second,19,0.239495133890413,0
29 | 28,Joseph,Second,19,0.13339905245557093,0
30 | 29,Everette,Second,25,-0.05247099359328755,0
31 | 30,Marvin,Second,28,-0.19573939958729408,0
32 | 31,Javier,Second,30,0.05633173752678569,0
33 | 32,Henry,Second,27,0.27337697150232154,0
34 | 33,Danial,Second,19,0.035732654475504416,0
35 | 34,Nathan,Second,28,0.16710933246405404,0
36 | 35,Ted,Second,29,0.11803075686892277,0
37 | 36,Terry,Second,29,-0.04292625914687434,0
38 | 37,Steve,Second,28,0.095790452791044,0
39 | 38,Thomas,Second,24,0.24672889334284212,0
40 | 39,Roger,Second,24,0.283840873548118,0
41 | 40,Mohammed,Second,26,0.051228487707243225,0
42 | 41,Willie,Second,19,0.20917767367408258,0
43 | 42,Kirk,Second,20,0.19942904917556722,0
44 | 43,Michael,Second,20,0.15422585211393533,0
45 | 44,Michael,Second,24,0.28393200392724266,0
46 | 45,Eric,Second,20,0.09745891695603548,0
47 | 46,Clarence,Second,19,0.31664524842743774,0
48 | 47,Carlton,Second,23,0.1773202254698855,0
49 | 48,Luis,Second,18,0.27839082801769,0
50 | 49,John,Second,30,0.054660561401091684,0
51 | 50,Charles,Second,23,0.2650851301971685,0
52 | 51,Larry,Second,30,0.2332012629598002,0
53 | 52,Kennith,Second,22,0.09145689840254737,0
54 | 53,John,Second,24,0.07367423085546251,0
55 | 54,David,Second,20,0.38788183919220665,0
56 | 55,Taylor,Second,20,-0.09013516583105652,0
57 | 56,Michael,Second,23,0.14929253040151808,0
58 | 57,Wesley,Second,21,0.11829259099025831,0
59 | 58,Jack,Second,20,0.2508762605696313,0
60 | 59,Drew,Second,22,0.338413335092722,0
61 | 60,Gary,Second,20,0.22522207500283975,0
62 | 61,Robert,Second,26,0.23633529611823184,0
63 | 62,Charles,Second,29,0.2795933656881275,0
64 | 63,Lawrence,Second,24,0.24236170132965745,0
65 | 64,Billy,Second,25,0.1899003709475807,0
66 | 65,Travis,Second,19,0.1874615315100216,0
67 | 66,Kelly,Second,21,0.30235002459123894,0
68 | 67,Johnnie,Second,23,0.3163114940981212,0
69 | 68,Kenneth,Second,25,0.2740643666829032,0
70 | 69,John,Second,19,0.012181977400741478,0
71 | 70,Tony,Second,22,0.09835934812516556,0
72 | 71,Salvatore,Second,30,0.4520136386999405,0
73 | 72,Jack,Second,23,0.25539564991327174,0
74 | 73,Jose,Second,28,0.0786106136179638,0
75 | 74,John,Second,24,0.12241580786522864,0
76 | 75,Richard,Second,18,0.40178677716250855,0
77 | 76,Alan,Second,24,0.4372059809366845,0
78 | 77,Edward,Second,30,0.24097122388336403,0
79 | 78,Kenny,Second,30,0.06445127757212021,0
80 | 79,Ian,Second,24,0.15513922981670242,0
81 | 80,Brian,Second,29,0.11010173446673013,0
82 | 81,Chad,Second,24,0.23685904372932107,0
83 | 82,Lowell,Second,19,0.27445529812093933,0
84 | 83,Jonathon,Second,24,0.3479436738157262,0
85 | 84,Chester,Second,25,0.30325852598656555,0
86 | 85,Harold,Second,28,-0.05647148083115222,0
87 | 86,Michael,Second,28,0.2746306882996265,0
88 | 87,James,Second,23,0.28062428042451926,0
89 | 88,Charles,Second,18,0.2194949800913744,0
90 | 89,Arthur,Second,21,0.3179884384595796,0
91 | 90,Robert,Second,21,0.11480878950641295,0
92 | 91,William,Second,30,0.27293437931701964,0
93 | 92,Raymond,Second,25,0.16910338931169927,0
94 | 93,Michael,Second,18,0.1308264205042977,0
95 | 94,James,Second,27,0.2221826008685691,0
96 | 95,James,Second,22,0.18958412720210643,0
97 | 96,Jayson,Second,30,0.15033256868867007,0
98 | 97,Don,Second,24,0.037542972657397755,0
99 | 98,Joseph,Second,29,0.16773969746312756,0
100 | 99,Paul,Second,22,0.3207062846500329,0
101 | 100,Roberto,Second,27,0.24018886173854176,0
102 | 101,Vanessa,Second,25,0.09528604933894898,1
103 | 102,Alice,Second,23,0.35652906143600593,1
104 | 103,Josephine,Second,27,0.23005189692973765,1
105 | 104,Annie,Second,28,0.23758159696237785,1
106 | 105,Veronica,Second,18,-0.015878682547588063,1
107 | 106,Elizabeth,Second,23,0.1801679870121067,1
108 | 107,Marie,Second,29,0.09205007645882486,1
109 | 108,Barbara,Second,20,0.37477524058994466,1
110 | 109,Donna,Second,29,0.3977660558165214,1
111 | 110,Shannon,Second,29,0.12222493339484668,1
112 | 111,Miranda,Second,28,0.35677413548241904,1
113 | 112,Brianna,Second,22,0.032906435688219854,1
114 | 113,Willie,Second,25,0.07333384254232847,1
115 | 114,Rachel,Second,21,-0.13513376055241383,1
116 | 115,Maria,Second,21,0.21243863271006194,1
117 | 116,Barbara,Second,23,0.05104709786353265,1
118 | 117,Mattie,Second,26,0.35652516032014075,1
119 | 118,Barbara,Second,22,0.17856569899742927,1
120 | 119,Nicole,Second,22,0.11565731434005809,1
121 | 120,Kimberly,Second,25,0.16475079684553856,1
122 | 121,Maya,Second,27,0.20817392472459725,1
123 | 122,Tammy,Second,21,0.4659621073459406,1
124 | 123,Marilyn,Second,24,0.058704401624141145,1
125 | 124,Karen,Second,26,0.2657062800649837,1
126 | 125,Sherri,Second,20,-0.14887138583291587,1
127 | 126,Lisa,Second,22,0.2051120660924029,1
128 | 127,Ruth,Second,23,0.3831243915509889,1
129 | 128,Beatriz,Second,22,0.3124600441888724,1
130 | 129,Wilma,Second,25,0.09463966222429995,1
131 | 130,Alyssa,Second,30,0.14358200116549735,1
132 | 131,Samira,Second,24,0.23312851820496788,1
133 | 132,Danielle,Second,26,0.21597688241527108,1
134 | 133,Rachal,Second,30,0.06783799651820446,1
135 | 134,Candice,Second,30,0.23355654022467168,1
136 | 135,Yvonne,Second,30,0.18922628195182462,1
137 | 136,Lorraine,Second,19,0.17728153493121623,1
138 | 137,Minnie,Second,25,0.3492333981148308,1
139 | 138,Katherine,Second,27,0.18958710343574606,1
140 | 139,Teresa,Second,24,0.1262278337326905,1
141 | 140,Suzanne,Second,21,0.13989189213931089,1
142 | 141,Maria,Second,30,-0.0015909873319689682,1
143 | 142,Laura,Second,21,0.2334011707479643,1
144 | 143,Georgette,Second,20,0.35302209254378053,1
145 | 144,Marcia,Second,19,0.5226521787068581,1
146 | 145,Susie,Second,21,0.36329810589236516,1
147 | 146,Deanna,Second,18,0.2708931557358139,1
148 | 147,Harriet,Second,22,0.225303105712023,1
149 | 148,Laverne,Second,23,0.2507592828697621,1
150 | 149,Evelyn,Second,27,0.12194354809915783,1
151 | 150,Jessica,Second,22,0.2058315931315564,1
152 | 151,Mary,Second,28,0.007210535525405459,1
153 | 152,Maurine,Second,23,-0.019741463652366897,1
154 | 153,Millicent,Second,21,0.17019239577663078,1
155 | 154,Twila,Second,22,0.15963143828374393,1
156 | 155,Kim,Second,27,0.2916459521214245,1
157 | 156,Elida,Second,27,0.24632515194807486,1
158 | 157,Robin,Second,21,0.32019531307941457,1
159 | 158,Katrina,Second,23,0.1786902612289475,1
160 | 159,Christina,Second,23,0.25749564959441507,1
161 | 160,Ashley,Second,21,0.18779526658565132,1
162 | 161,Katherine,Second,19,0.1342275752281948,1
163 | 162,Stella,Second,18,0.09943435495786426,1
164 | 163,Lillian,Second,29,0.3417119938200113,1
165 | 164,Megan,Second,26,0.06784530180928128,1
166 | 165,Martha,Second,30,0.21525819802859544,1
167 | 166,Tamra,Second,22,0.021557032672541637,1
168 | 167,Barbara,Second,23,0.13108084474542808,1
169 | 168,Helen,Second,23,0.11891207621232601,1
170 | 169,Delores,Second,20,0.33798670232487327,1
171 | 170,Cassandra,Second,19,0.10828015460027368,1
172 | 171,Shawn,Second,20,0.22800169919130298,1
173 | 172,Diane,Second,23,0.3677471825878867,1
174 | 173,Lena,Second,26,0.11473052278419268,1
175 | 174,Renee,Second,29,0.3483514665374877,1
176 | 175,Linda,Second,20,0.23109904142017587,1
177 | 176,Brooke,Second,21,0.1584449775181626,1
178 | 177,Angela,Second,24,0.11253400451571867,1
179 | 178,Bridget,Second,21,0.21473137093091682,1
180 | 179,Betty,Second,24,-0.04756645107718965,1
181 | 180,Lola,Second,30,0.06458587795355406,1
182 | 181,Debra,Second,21,0.19182946688755703,1
183 | 182,Debra,Second,29,0.280133485322458,1
184 | 183,Diana,Second,19,0.11740521576704997,1
185 | 184,Mary,Second,28,0.35378213442810325,1
186 | 185,Mable,Second,23,0.21679690354764067,1
187 | 186,Jeanne,Second,30,0.18813859200852834,1
188 | 187,Sharon,Second,26,0.444073904719296,1
189 | 188,Lucia,Second,18,0.030800102024488796,1
190 | 189,Kimberly,Second,24,0.08286181591434122,1
191 | 190,Crystal,Second,19,0.3617175612493313,1
192 | 191,Esther,Second,25,0.32482186789216494,1
193 | 192,Della,Second,28,0.19985402582295458,1
194 | 193,Joy,Second,20,0.4014913213450044,1
195 | 194,Benita,Second,24,0.3715649470597647,1
196 | 195,Doris,Second,18,0.2321835805444617,1
197 | 196,Francisca,Second,27,0.28965269009393924,1
198 | 197,Nia,Second,20,0.22308344443480868,1
199 | 198,Christina,Second,29,0.06911288315541994,1
200 | 199,Marta,Second,26,0.2913960636127055,1
201 | 200,Julia,Second,25,0.20249291104486722,1
202 |
--------------------------------------------------------------------------------
/SimData/SixthDayData.csv:
--------------------------------------------------------------------------------
1 | ID,Name,Day,Age,Response,Gender
2 | 1,John,Sixth,23,0.5627187141917855,0
3 | 2,Billie,Sixth,22,0.6011122996634237,0
4 | 3,Robert,Sixth,20,0.37624096163859233,0
5 | 4,Don,Sixth,27,0.5229607643652396,0
6 | 5,Joseph,Sixth,21,0.44213240419590205,0
7 | 6,James,Sixth,25,0.4571030819121562,0
8 | 7,Delbert,Sixth,26,0.5381738662221578,0
9 | 8,Gary,Sixth,24,0.45091858446320987,0
10 | 9,Scott,Sixth,27,0.5559681620837437,0
11 | 10,Steve,Sixth,27,0.5525724860353819,0
12 | 11,Frank,Sixth,18,0.34157597865694245,0
13 | 12,Eric,Sixth,23,0.512687736538734,0
14 | 13,Wendell,Sixth,27,0.4933996370284516,0
15 | 14,James,Sixth,21,0.4517822116966478,0
16 | 15,Paul,Sixth,20,0.28884645180163937,0
17 | 16,Juan,Sixth,26,0.511309398445967,0
18 | 17,Walter,Sixth,30,0.48763740268097405,0
19 | 18,Richard,Sixth,23,0.5248170458806685,0
20 | 19,Felix,Sixth,21,0.6719892697762015,0
21 | 20,Andre,Sixth,21,0.44492116509875906,0
22 | 21,Jeffrey,Sixth,26,0.4035001434778803,0
23 | 22,Dave,Sixth,21,0.5538101525320848,0
24 | 23,James,Sixth,29,0.36994167702023284,0
25 | 24,Lemuel,Sixth,27,0.29449460162573504,0
26 | 25,Tommy,Sixth,23,0.7125960371855942,0
27 | 26,Carlos,Sixth,22,0.560689934295333,0
28 | 27,Willie,Sixth,19,0.44267903786725915,0
29 | 28,Joseph,Sixth,19,0.46734362611498603,0
30 | 29,Everette,Sixth,25,0.6954712644704699,0
31 | 30,Marvin,Sixth,28,0.5338449267566893,0
32 | 31,Javier,Sixth,30,0.5053801595683928,0
33 | 32,Henry,Sixth,27,0.4386438165903696,0
34 | 33,Danial,Sixth,19,0.44395374025103196,0
35 | 34,Nathan,Sixth,28,0.6104137051112386,0
36 | 35,Ted,Sixth,29,0.4387538730184034,0
37 | 36,Terry,Sixth,29,0.5828116958700524,0
38 | 37,Steve,Sixth,28,0.4883025967736782,0
39 | 38,Thomas,Sixth,24,0.5708048197461699,0
40 | 39,Roger,Sixth,24,0.5903570754206436,0
41 | 40,Mohammed,Sixth,26,0.5710369057808238,0
42 | 41,Willie,Sixth,19,0.3545339060940288,0
43 | 42,Kirk,Sixth,20,0.5931082193103651,0
44 | 43,Michael,Sixth,20,0.4278974215619132,0
45 | 44,Michael,Sixth,24,0.7627312850675907,0
46 | 45,Eric,Sixth,20,0.36098658033665276,0
47 | 46,Clarence,Sixth,19,0.2723403918403283,0
48 | 47,Carlton,Sixth,23,0.48309245449383376,0
49 | 48,Luis,Sixth,18,0.5978956173958363,0
50 | 49,John,Sixth,30,0.46195137886589926,0
51 | 50,Charles,Sixth,23,0.44797102389370363,0
52 | 51,Larry,Sixth,30,0.6005101847929761,0
53 | 52,Kennith,Sixth,22,0.640767304140932,0
54 | 53,John,Sixth,24,0.31667987578856716,0
55 | 54,David,Sixth,20,0.5460591953743089,0
56 | 55,Taylor,Sixth,20,0.42024687092011237,0
57 | 56,Michael,Sixth,23,0.503040391617558,0
58 | 57,Wesley,Sixth,21,0.5252979188424935,0
59 | 58,Jack,Sixth,20,0.4456059188027668,0
60 | 59,Drew,Sixth,22,0.4963736106787016,0
61 | 60,Gary,Sixth,20,0.44755850067210423,0
62 | 61,Robert,Sixth,26,0.433021422000792,0
63 | 62,Charles,Sixth,29,0.4821278711793452,0
64 | 63,Lawrence,Sixth,24,0.4054221747322013,0
65 | 64,Billy,Sixth,25,0.5459887509348277,0
66 | 65,Travis,Sixth,19,0.4482537127438954,0
67 | 66,Kelly,Sixth,21,0.4947167997604914,0
68 | 67,Johnnie,Sixth,23,0.49460618533630774,0
69 | 68,Kenneth,Sixth,25,0.5652839716526309,0
70 | 69,John,Sixth,19,0.34318786073239826,0
71 | 70,Tony,Sixth,22,0.5142301178099664,0
72 | 71,Salvatore,Sixth,30,0.5009923942795725,0
73 | 72,Jack,Sixth,23,0.453988848810899,0
74 | 73,Jose,Sixth,28,0.4821673612287138,0
75 | 74,John,Sixth,24,0.47226569405417884,0
76 | 75,Richard,Sixth,18,0.6197608040669679,0
77 | 76,Alan,Sixth,24,0.5335412407017036,0
78 | 77,Edward,Sixth,30,0.5938522409655508,0
79 | 78,Kenny,Sixth,30,0.41093795718540826,0
80 | 79,Ian,Sixth,24,0.4959098187308255,0
81 | 80,Brian,Sixth,29,0.5308543203711171,0
82 | 81,Chad,Sixth,24,0.3173498201434641,0
83 | 82,Lowell,Sixth,19,0.42484959326038846,0
84 | 83,Jonathon,Sixth,24,0.4720788961850801,0
85 | 84,Chester,Sixth,25,0.5393488384028237,0
86 | 85,Harold,Sixth,28,0.46636818275264025,0
87 | 86,Michael,Sixth,28,0.564364490050406,0
88 | 87,James,Sixth,23,0.6633255597766218,0
89 | 88,Charles,Sixth,18,0.6406938401660549,0
90 | 89,Arthur,Sixth,21,0.6547226491561557,0
91 | 90,Robert,Sixth,21,0.46504208030379424,0
92 | 91,William,Sixth,30,0.5665519641804087,0
93 | 92,Raymond,Sixth,25,0.6234046756685127,0
94 | 93,Michael,Sixth,18,0.4054389794121322,0
95 | 94,James,Sixth,27,0.4832817739075767,0
96 | 95,James,Sixth,22,0.4623935581996443,0
97 | 96,Jayson,Sixth,30,0.6183163685997498,0
98 | 97,Don,Sixth,24,0.5733711927951894,0
99 | 98,Joseph,Sixth,29,0.4873175435671538,0
100 | 99,Paul,Sixth,22,0.688110681439846,0
101 | 100,Roberto,Sixth,27,0.434629408779397,0
102 | 101,Vanessa,Sixth,25,0.5111038562077044,1
103 | 102,Alice,Sixth,23,0.4972015920269251,1
104 | 103,Josephine,Sixth,27,0.6222947266717184,1
105 | 104,Annie,Sixth,28,0.4729998858439837,1
106 | 105,Veronica,Sixth,18,0.49929018827319105,1
107 | 106,Elizabeth,Sixth,23,0.3895004576945725,1
108 | 107,Marie,Sixth,29,0.4726102218311762,1
109 | 108,Barbara,Sixth,20,0.46548009145996394,1
110 | 109,Donna,Sixth,29,0.4993503685979966,1
111 | 110,Shannon,Sixth,29,0.536872124109889,1
112 | 111,Miranda,Sixth,28,0.5454813912263198,1
113 | 112,Brianna,Sixth,22,0.45206577509430196,1
114 | 113,Willie,Sixth,25,0.39099589041022575,1
115 | 114,Rachel,Sixth,21,0.49833795888701615,1
116 | 115,Maria,Sixth,21,0.6115318473116368,1
117 | 116,Barbara,Sixth,23,0.3798873826666749,1
118 | 117,Mattie,Sixth,26,0.6024999519165927,1
119 | 118,Barbara,Sixth,22,0.5365787533599118,1
120 | 119,Nicole,Sixth,22,0.3719803042196256,1
121 | 120,Kimberly,Sixth,25,0.3900251680666901,1
122 | 121,Maya,Sixth,27,0.5012211361474402,1
123 | 122,Tammy,Sixth,21,0.5900732351352194,1
124 | 123,Marilyn,Sixth,24,0.5111264805624623,1
125 | 124,Karen,Sixth,26,0.5719529873473642,1
126 | 125,Sherri,Sixth,20,0.5344687407956776,1
127 | 126,Lisa,Sixth,22,0.4285293196734672,1
128 | 127,Ruth,Sixth,23,0.4141276409539065,1
129 | 128,Beatriz,Sixth,22,0.580891276391413,1
130 | 129,Wilma,Sixth,25,0.41292421225187,1
131 | 130,Alyssa,Sixth,30,0.5691490519310829,1
132 | 131,Samira,Sixth,24,0.5983022594122839,1
133 | 132,Danielle,Sixth,26,0.6119405745912091,1
134 | 133,Rachal,Sixth,30,0.4502686799797943,1
135 | 134,Candice,Sixth,30,0.4958386248306951,1
136 | 135,Yvonne,Sixth,30,0.5707502520010675,1
137 | 136,Lorraine,Sixth,19,0.4435393854940667,1
138 | 137,Minnie,Sixth,25,0.4677632036651698,1
139 | 138,Katherine,Sixth,27,0.40429724258458183,1
140 | 139,Teresa,Sixth,24,0.6421220921833651,1
141 | 140,Suzanne,Sixth,21,0.542283761995531,1
142 | 141,Maria,Sixth,30,0.39329161255034334,1
143 | 142,Laura,Sixth,21,0.5375873055372921,1
144 | 143,Georgette,Sixth,20,0.392442361268742,1
145 | 144,Marcia,Sixth,19,0.5829517088661433,1
146 | 145,Susie,Sixth,21,0.48000016154717273,1
147 | 146,Deanna,Sixth,18,0.4949746972751772,1
148 | 147,Harriet,Sixth,22,0.46516205380374437,1
149 | 148,Laverne,Sixth,23,0.21852240343463564,1
150 | 149,Evelyn,Sixth,27,0.5256522259273075,1
151 | 150,Jessica,Sixth,22,0.46267561132136725,1
152 | 151,Mary,Sixth,28,0.5971399636524906,1
153 | 152,Maurine,Sixth,23,0.3862647280799457,1
154 | 153,Millicent,Sixth,21,0.41539557943221994,1
155 | 154,Twila,Sixth,22,0.4434321643778448,1
156 | 155,Kim,Sixth,27,0.5783197667230191,1
157 | 156,Elida,Sixth,27,0.4595253229609275,1
158 | 157,Robin,Sixth,21,0.40689434554939796,1
159 | 158,Katrina,Sixth,23,0.574720890916179,1
160 | 159,Christina,Sixth,23,0.44716957475220676,1
161 | 160,Ashley,Sixth,21,0.36587775373073034,1
162 | 161,Katherine,Sixth,19,0.5443646468409017,1
163 | 162,Stella,Sixth,18,0.38119081334213684,1
164 | 163,Lillian,Sixth,29,0.5827037820459395,1
165 | 164,Megan,Sixth,26,0.6712950290615973,1
166 | 165,Martha,Sixth,30,0.5999854536629398,1
167 | 166,Tamra,Sixth,22,0.5426967026078454,1
168 | 167,Barbara,Sixth,23,0.5266036117738924,1
169 | 168,Helen,Sixth,23,0.38274411414019605,1
170 | 169,Delores,Sixth,20,0.5125524640036196,1
171 | 170,Cassandra,Sixth,19,0.5445426304713614,1
172 | 171,Shawn,Sixth,20,0.5415660559256122,1
173 | 172,Diane,Sixth,23,0.31139991061482986,1
174 | 173,Lena,Sixth,26,0.4249519659560316,1
175 | 174,Renee,Sixth,29,0.4841828832501326,1
176 | 175,Linda,Sixth,20,0.4267961009247867,1
177 | 176,Brooke,Sixth,21,0.566598184431002,1
178 | 177,Angela,Sixth,24,0.48775862669517905,1
179 | 178,Bridget,Sixth,21,0.4569162017466531,1
180 | 179,Betty,Sixth,24,0.534980963105169,1
181 | 180,Lola,Sixth,30,0.5152307543228434,1
182 | 181,Debra,Sixth,21,0.40830678550869137,1
183 | 182,Debra,Sixth,29,0.6112997110674216,1
184 | 183,Diana,Sixth,19,0.41919925141276265,1
185 | 184,Mary,Sixth,28,0.5751100677634319,1
186 | 185,Mable,Sixth,23,0.49041574023450657,1
187 | 186,Jeanne,Sixth,30,0.3049416329938862,1
188 | 187,Sharon,Sixth,26,0.4326362856392755,1
189 | 188,Lucia,Sixth,18,0.38953007913175974,1
190 | 189,Kimberly,Sixth,24,0.5165075984515924,1
191 | 190,Crystal,Sixth,19,0.37998579451393755,1
192 | 191,Esther,Sixth,25,0.35987570615368214,1
193 | 192,Della,Sixth,28,0.5487373450086704,1
194 | 193,Joy,Sixth,20,0.5711191682655571,1
195 | 194,Benita,Sixth,24,0.5812982298969092,1
196 | 195,Doris,Sixth,18,0.5366558449616664,1
197 | 196,Francisca,Sixth,27,0.4946573817954197,1
198 | 197,Nia,Sixth,20,0.48775524353357663,1
199 | 198,Christina,Sixth,29,0.49946937325955093,1
200 | 199,Marta,Sixth,26,0.42786748248659734,1
201 | 200,Julia,Sixth,25,0.40367954499254277,1
202 |
--------------------------------------------------------------------------------
/SimData/ThirdDayData.csv:
--------------------------------------------------------------------------------
1 | ID,Name,Day,Age,Response,Gender
2 | 1,John,Third,23,0.40099450001692183,0
3 | 2,Billie,Third,22,0.2651030211212087,0
4 | 3,Robert,Third,20,0.3934713155214702,0
5 | 4,Don,Third,27,0.3787219484401598,0
6 | 5,Joseph,Third,21,0.2412362638754793,0
7 | 6,James,Third,25,0.18754160281591353,0
8 | 7,Delbert,Third,26,0.17759525036805815,0
9 | 8,Gary,Third,24,0.2823216654409193,0
10 | 9,Scott,Third,27,0.2715643824984445,0
11 | 10,Steve,Third,27,0.007035479172166403,0
12 | 11,Frank,Third,18,0.24131178636553074,0
13 | 12,Eric,Third,23,0.27542227505462846,0
14 | 13,Wendell,Third,27,0.12782686943106428,0
15 | 14,James,Third,21,0.06463197427610937,0
16 | 15,Paul,Third,20,0.293886077826389,0
17 | 16,Juan,Third,26,0.367367789760011,0
18 | 17,Walter,Third,30,0.14224958214557817,0
19 | 18,Richard,Third,23,0.32214838858372324,0
20 | 19,Felix,Third,21,0.23399598430215057,0
21 | 20,Andre,Third,21,0.1392840120896406,0
22 | 21,Jeffrey,Third,26,0.23206629227793835,0
23 | 22,Dave,Third,21,0.2549411491510197,0
24 | 23,James,Third,29,0.28214891447047447,0
25 | 24,Lemuel,Third,27,0.31139237907578526,0
26 | 25,Tommy,Third,23,0.2374548887378006,0
27 | 26,Carlos,Third,22,0.05930328670685148,0
28 | 27,Willie,Third,19,0.2614913493489208,0
29 | 28,Joseph,Third,19,0.4364128270365927,0
30 | 29,Everette,Third,25,0.26885848350337566,0
31 | 30,Marvin,Third,28,0.44306506201217455,0
32 | 31,Javier,Third,30,0.29939261233472636,0
33 | 32,Henry,Third,27,0.30661705166289227,0
34 | 33,Danial,Third,19,0.4747952419634716,0
35 | 34,Nathan,Third,28,0.4521864778232023,0
36 | 35,Ted,Third,29,0.41813704687207215,0
37 | 36,Terry,Third,29,0.25589377280021325,0
38 | 37,Steve,Third,28,0.22768553405418746,0
39 | 38,Thomas,Third,24,0.29952441747563846,0
40 | 39,Roger,Third,24,0.49841611020640886,0
41 | 40,Mohammed,Third,26,0.25914601720201685,0
42 | 41,Willie,Third,19,0.2736349340787063,0
43 | 42,Kirk,Third,20,0.19531973065286667,0
44 | 43,Michael,Third,20,0.35084896207265936,0
45 | 44,Michael,Third,24,0.38676074922947157,0
46 | 45,Eric,Third,20,0.27092578662801714,0
47 | 46,Clarence,Third,19,0.01098110777362965,0
48 | 47,Carlton,Third,23,0.22676598774260986,0
49 | 48,Luis,Third,18,0.32233442970067316,0
50 | 49,John,Third,30,0.43120859365897035,0
51 | 50,Charles,Third,23,0.5686955105331662,0
52 | 51,Larry,Third,30,0.4807976934906111,0
53 | 52,Kennith,Third,22,0.23056466292325006,0
54 | 53,John,Third,24,0.17932957832978297,0
55 | 54,David,Third,20,0.365902979653449,0
56 | 55,Taylor,Third,20,0.20784711602511152,0
57 | 56,Michael,Third,23,0.5203830691599985,0
58 | 57,Wesley,Third,21,0.29417339417647476,0
59 | 58,Jack,Third,20,0.4495707486803632,0
60 | 59,Drew,Third,22,0.3513554778490964,0
61 | 60,Gary,Third,20,0.18875735935160126,0
62 | 61,Robert,Third,26,0.08055405914894032,0
63 | 62,Charles,Third,29,0.25821838621774185,0
64 | 63,Lawrence,Third,24,0.3061542830576999,0
65 | 64,Billy,Third,25,0.31737566559001446,0
66 | 65,Travis,Third,19,0.2812295411119703,0
67 | 66,Kelly,Third,21,0.2845514095642269,0
68 | 67,Johnnie,Third,23,0.2882679023777756,0
69 | 68,Kenneth,Third,25,0.4221732276492527,0
70 | 69,John,Third,19,0.2741571309929128,0
71 | 70,Tony,Third,22,0.3501923990841354,0
72 | 71,Salvatore,Third,30,0.433984295684314,0
73 | 72,Jack,Third,23,0.403261423171382,0
74 | 73,Jose,Third,28,0.2372826486959767,0
75 | 74,John,Third,24,0.33605176895219085,0
76 | 75,Richard,Third,18,0.3229951010481258,0
77 | 76,Alan,Third,24,0.3398330676915337,0
78 | 77,Edward,Third,30,0.22263673999145328,0
79 | 78,Kenny,Third,30,0.45900270104494323,0
80 | 79,Ian,Third,24,0.31425691245324106,0
81 | 80,Brian,Third,29,0.33125333092310427,0
82 | 81,Chad,Third,24,0.1426084021342257,0
83 | 82,Lowell,Third,19,0.27615080684687426,0
84 | 83,Jonathon,Third,24,0.2803759992731195,0
85 | 84,Chester,Third,25,0.2397454114410601,0
86 | 85,Harold,Third,28,0.22858181066981265,0
87 | 86,Michael,Third,28,0.4489393220007064,0
88 | 87,James,Third,23,0.19639637129859414,0
89 | 88,Charles,Third,18,0.3212921041739039,0
90 | 89,Arthur,Third,21,0.23668318624177367,0
91 | 90,Robert,Third,21,0.3577155627158181,0
92 | 91,William,Third,30,0.39472227149384365,0
93 | 92,Raymond,Third,25,0.277671078544264,0
94 | 93,Michael,Third,18,0.26389649494785766,0
95 | 94,James,Third,27,0.13507528808468738,0
96 | 95,James,Third,22,0.2650233622366795,0
97 | 96,Jayson,Third,30,0.10328605742033237,0
98 | 97,Don,Third,24,0.3897570972467946,0
99 | 98,Joseph,Third,29,0.34675495780308835,0
100 | 99,Paul,Third,22,0.12196937996826587,0
101 | 100,Roberto,Third,27,0.3206500804901801,0
102 | 101,Vanessa,Third,25,0.2982698261263043,1
103 | 102,Alice,Third,23,0.163143512516671,1
104 | 103,Josephine,Third,27,0.2546435281845215,1
105 | 104,Annie,Third,28,0.1626793086510125,1
106 | 105,Veronica,Third,18,0.15894234898808557,1
107 | 106,Elizabeth,Third,23,0.13821001205483563,1
108 | 107,Marie,Third,29,0.4296772701722621,1
109 | 108,Barbara,Third,20,0.26983532525703535,1
110 | 109,Donna,Third,29,0.2655069673292091,1
111 | 110,Shannon,Third,29,0.40413085568694884,1
112 | 111,Miranda,Third,28,0.4800537578490202,1
113 | 112,Brianna,Third,22,0.337140978273721,1
114 | 113,Willie,Third,25,0.42419288301190494,1
115 | 114,Rachel,Third,21,0.48599986732070316,1
116 | 115,Maria,Third,21,0.3629540970920129,1
117 | 116,Barbara,Third,23,0.16852493317252487,1
118 | 117,Mattie,Third,26,0.23676172304585183,1
119 | 118,Barbara,Third,22,0.06152609938210449,1
120 | 119,Nicole,Third,22,0.3503871294979333,1
121 | 120,Kimberly,Third,25,0.2007687858885483,1
122 | 121,Maya,Third,27,0.10781467853414786,1
123 | 122,Tammy,Third,21,0.31248710828775866,1
124 | 123,Marilyn,Third,24,0.2315918082881084,1
125 | 124,Karen,Third,26,0.37925839099607017,1
126 | 125,Sherri,Third,20,0.22479738552961437,1
127 | 126,Lisa,Third,22,0.3937598093564011,1
128 | 127,Ruth,Third,23,0.35766639997738886,1
129 | 128,Beatriz,Third,22,0.31682189635993135,1
130 | 129,Wilma,Third,25,0.37585841457391245,1
131 | 130,Alyssa,Third,30,0.3085852064080091,1
132 | 131,Samira,Third,24,0.151746926403271,1
133 | 132,Danielle,Third,26,0.22753745612351065,1
134 | 133,Rachal,Third,30,0.3610553615449557,1
135 | 134,Candice,Third,30,0.4388949258928928,1
136 | 135,Yvonne,Third,30,0.4048133036787922,1
137 | 136,Lorraine,Third,19,0.40408945966394383,1
138 | 137,Minnie,Third,25,0.29526460138588445,1
139 | 138,Katherine,Third,27,0.23218295461563465,1
140 | 139,Teresa,Third,24,0.288099569320385,1
141 | 140,Suzanne,Third,21,0.19281315359303006,1
142 | 141,Maria,Third,30,0.20878605927260152,1
143 | 142,Laura,Third,21,0.31001170478878587,1
144 | 143,Georgette,Third,20,0.25414741656924617,1
145 | 144,Marcia,Third,19,0.2544845379303242,1
146 | 145,Susie,Third,21,0.2552596121234506,1
147 | 146,Deanna,Third,18,0.3411282642309317,1
148 | 147,Harriet,Third,22,0.28177574540659334,1
149 | 148,Laverne,Third,23,0.39777461852353124,1
150 | 149,Evelyn,Third,27,0.32634821778406403,1
151 | 150,Jessica,Third,22,0.41692996920989045,1
152 | 151,Mary,Third,28,0.2912700180826905,1
153 | 152,Maurine,Third,23,0.3658273349613423,1
154 | 153,Millicent,Third,21,0.1814600319803471,1
155 | 154,Twila,Third,22,0.11450456796224576,1
156 | 155,Kim,Third,27,0.30006578684806806,1
157 | 156,Elida,Third,27,0.2973024979581068,1
158 | 157,Robin,Third,21,0.344319840415806,1
159 | 158,Katrina,Third,23,0.3941285963124728,1
160 | 159,Christina,Third,23,0.24304273009426638,1
161 | 160,Ashley,Third,21,0.26499460705798444,1
162 | 161,Katherine,Third,19,0.25160993626318373,1
163 | 162,Stella,Third,18,0.32252690003313333,1
164 | 163,Lillian,Third,29,0.4416691488521206,1
165 | 164,Megan,Third,26,0.20979142796607642,1
166 | 165,Martha,Third,30,0.20579162165361542,1
167 | 166,Tamra,Third,22,0.3006375132361834,1
168 | 167,Barbara,Third,23,0.26012685200209723,1
169 | 168,Helen,Third,23,0.37544374017988963,1
170 | 169,Delores,Third,20,0.12954699806939204,1
171 | 170,Cassandra,Third,19,0.25409331110726163,1
172 | 171,Shawn,Third,20,0.30561798955842207,1
173 | 172,Diane,Third,23,0.49581334447247716,1
174 | 173,Lena,Third,26,0.383550329773357,1
175 | 174,Renee,Third,29,0.45728244409775576,1
176 | 175,Linda,Third,20,0.10356925135228409,1
177 | 176,Brooke,Third,21,0.25823733255742,1
178 | 177,Angela,Third,24,0.17522977093065387,1
179 | 178,Bridget,Third,21,0.37387048838960085,1
180 | 179,Betty,Third,24,0.2010030230852912,1
181 | 180,Lola,Third,30,0.0880386725320789,1
182 | 181,Debra,Third,21,0.328620856473355,1
183 | 182,Debra,Third,29,0.1969407114408554,1
184 | 183,Diana,Third,19,0.26113471045468545,1
185 | 184,Mary,Third,28,0.3870255632085793,1
186 | 185,Mable,Third,23,0.21058587572911364,1
187 | 186,Jeanne,Third,30,0.16476734498706566,1
188 | 187,Sharon,Third,26,0.1743039523286418,1
189 | 188,Lucia,Third,18,0.24989590639300924,1
190 | 189,Kimberly,Third,24,0.25267980535238743,1
191 | 190,Crystal,Third,19,0.46502800197051064,1
192 | 191,Esther,Third,25,0.458334791314361,1
193 | 192,Della,Third,28,0.33932267945918027,1
194 | 193,Joy,Third,20,0.22438433095955929,1
195 | 194,Benita,Third,24,0.6592965632897276,1
196 | 195,Doris,Third,18,0.20466130015714384,1
197 | 196,Francisca,Third,27,0.3030593621001276,1
198 | 197,Nia,Third,20,0.4927684348890771,1
199 | 198,Christina,Third,29,0.36457646827993395,1
200 | 199,Marta,Third,26,0.28107371385808283,1
201 | 200,Julia,Third,25,0.3027358980468843,1
202 |
--------------------------------------------------------------------------------
/SimData/add_column.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/add_column.xlsx
--------------------------------------------------------------------------------
/SimData/add_column2.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/add_column2.xlsx
--------------------------------------------------------------------------------
/SimData/correlationMatrixPython.csv:
--------------------------------------------------------------------------------
1 | a,b,c,d
2 | 0.451109617,1.656398135,1.886103658,-0.10070441
3 | -0.406619935,0.860775396,0.76121547,-0.239570184
4 | -0.671949515,-0.171253565,0.157105206,0.267312138
5 | -1.34024302,-0.290990271,-0.694657176,0.395019082
6 | -0.081760795,-0.830078317,-1.590484647,-0.010961959
7 | -1.940509317,-0.593043656,-0.987545696,-1.321031653
8 | 2.377695589,-0.615924117,-0.599460273,1.073834675
9 | 0.704086641,-1.17319015,-1.366651123,0.55212635
10 | 0.648152594,0.285220717,0.118878789,-0.773284536
11 | -0.741412237,-0.963198038,-1.351818998,-0.930151343
12 | -1.174579515,0.74012786,1.118353451,0.101625296
13 | -1.974776505,-0.256420265,-0.337249292,0.668910133
14 | 0.751816749,-0.479965099,-0.225207132,-1.175858084
15 | -0.149951951,1.012262499,1.657436589,0.775908997
16 | -1.20911587,-0.102408003,0.36751734,-2.745060351
17 | -0.105897641,-1.82120344,-1.494784003,0.033753387
18 | -2.179810127,-2.726513997,-2.241689548,-0.941144711
19 | -1.620401942,-0.919287832,-0.854417456,-1.017859691
20 | 0.826749911,1.872327129,2.05057987,0.363004772
21 | -0.843717688,-0.955164427,-1.044947919,-0.631904151
22 | 0.189928471,-0.231814404,0.142409296,0.943062556
23 | -0.777577556,0.384704068,0.110681298,-0.244750609
24 | -2.463645543,-2.659254116,-2.568917223,-1.293290415
25 | -0.450944566,0.671363159,1.124268621,-1.149633603
26 | 0.69448771,-0.469050244,-0.376299125,0.276728971
27 | -0.442116356,-1.625255376,-1.225872758,0.260082885
28 | 1.136104061,1.674410657,1.650374462,-0.620733144
29 | -1.02007833,0.539156129,0.664141029,-0.5149178
30 | -0.325118384,-0.189054596,-0.690651031,0.196769731
31 | -0.363651289,-0.64873258,-0.822529035,0.917633544
32 | -0.564872764,-0.738053463,-0.737854469,0.032081108
33 | 0.320827834,-0.305408995,0.145481161,2.400210078
34 | -1.049103424,-2.465322974,-2.177183544,-1.507890394
35 | -0.332911538,-0.456820343,-0.646916581,-0.088646309
36 | -0.447904112,0.518732886,-0.316925637,0.277385616
37 | -0.062900956,0.179229397,-0.010926281,-1.365267289
38 | 0.136091379,0.171081946,0.255731045,0.052256182
39 | 0.360416268,1.184389355,0.933279526,0.111291495
40 | -0.608279709,0.337981364,0.259979256,0.237534246
41 | -0.157426722,-1.622878543,-1.487844206,-0.263918858
42 | -1.654438052,-0.195706257,-0.268488788,-0.365405826
43 | -0.055574153,-0.9950558,-0.691448221,1.155839221
44 | 0.598956671,-0.663368574,-0.511158826,0.456722197
45 | -0.570842225,0.721368651,0.945207838,1.12227903
46 | 2.338069591,0.547654942,0.741960987,2.021641696
47 | 0.734347967,-0.015628333,-0.561565582,0.759029576
48 | 1.233103953,0.905276496,0.501540357,-0.555798093
49 | -0.572039821,0.503281219,0.514250139,0.375189897
50 | -0.630575813,-0.453047505,-0.207227961,-1.497093857
51 | 0.413573106,-0.289388559,-0.241006047,-0.287295361
52 | 2.42158575,1.75018953,1.472064552,1.082983813
53 | -0.057167259,0.075104703,-0.251206744,1.072973114
54 | -0.445187637,-1.293568721,-1.759799631,-0.13075782
55 | -0.584732079,0.317674166,0.53890828,-0.401704179
56 | -0.028843341,0.649111514,-0.131775174,1.273988855
57 | -0.543849428,0.850675501,0.708218804,0.138664803
58 | -0.951991217,-0.514750306,-0.96480497,0.174477183
59 | 0.539793769,1.213563582,1.283993649,0.395666342
60 | 0.395663223,1.332421558,1.371437576,-0.133845994
61 | 0.247477563,0.725859707,0.754547125,0.211551836
62 | -1.301651608,-2.121829826,-2.307012167,0.61725343
63 | -0.259544109,0.481447781,0.37832522,0.134454182
64 | -0.025494132,-0.918434195,-0.817263038,-0.018157397
65 | 2.218527031,-0.550474476,-0.272374583,0.389271436
66 | -1.02861045,1.402446214,0.991021528,-1.815925384
67 | -0.781696047,0.02030602,-0.079670346,-1.017314399
68 | 0.483999351,-0.109075218,0.237229466,0.58803024
69 | 1.985150147,0.887215235,0.873863631,1.151390631
70 | 0.313235151,1.236596467,1.553665809,1.708147399
71 | 1.157720101,-0.175202926,-0.44910102,-0.508525774
72 | -2.235034965,-0.450496965,-0.58510842,-1.034184529
73 | -0.102706953,-0.612216498,-0.283515612,-0.573145051
74 | 0.567866149,-1.332319537,-1.259602388,-1.083649836
75 | 1.042027542,0.972473028,0.302041095,1.207745448
76 | 0.385473639,-0.016258103,0.341425972,-1.319128775
77 | -3.04664784,-0.593168984,-1.214103043,-0.115777848
78 | -0.090035406,-0.655675526,-1.109219455,0.705298484
79 | -0.022233882,1.781030419,1.396658216,-0.333652035
80 | -0.296580833,-0.750011716,-1.159021431,-1.744277863
81 | 0.463450503,-0.634709818,-0.607495582,0.501777158
82 | -0.673239249,0.969179346,1.082275474,-0.630373458
83 | 0.381626052,0.9501571,1.25388873,-1.223412041
84 | 0.677076643,0.800506197,1.277054174,-0.840932113
85 | 0.754090317,-0.648500906,-0.575266985,0.883707048
86 | 0.010421628,-0.202872812,-0.401072334,0.062575778
87 | -0.976370069,0.209051535,-0.106972948,0.401722444
88 | 2.118247862,1.564278891,1.651338101,1.410072226
89 | -1.623567922,-0.283276142,-0.236989322,-1.225774572
90 | -0.396876366,-1.19279205,-0.49933041,0.63658306
91 | -0.985746201,-1.352554104,-1.78619153,-0.663714196
92 | -0.919668347,-0.45819853,-0.010177811,-0.564801826
93 | 0.024780306,0.370590355,0.266830142,-0.299213
94 | 0.015172709,0.424436845,0.31081625,1.275700086
95 | 2.222039292,1.415341209,0.878860945,-0.157870808
96 | -0.520237701,-1.527706517,-2.149158852,0.428256437
97 | -1.267432742,0.564796372,0.072405982,-0.833255168
98 | -0.918575225,1.601138837,1.483487818,-0.699026205
99 | -0.134345436,-0.395035284,-0.344892161,-0.281536697
100 | 1.475233706,-0.781918572,0.022601119,-0.339946149
101 | 1.907907566,0.970562181,0.710675417,1.780056387
102 |
--------------------------------------------------------------------------------
/SimData/example_concat.dta:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/example_concat.dta
--------------------------------------------------------------------------------
/SimData/example_concat.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/example_concat.xlsx
--------------------------------------------------------------------------------
/SimData/example_concat1.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/example_concat1.xlsx
--------------------------------------------------------------------------------
/SimData/example_concat3.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/example_concat3.xlsx
--------------------------------------------------------------------------------
/SimData/example_sheets.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/example_sheets.xlsx
--------------------------------------------------------------------------------
/SimData/example_sheets1.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/example_sheets1.xlsx
--------------------------------------------------------------------------------
/SimData/example_sheets2.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/example_sheets2.xlsx
--------------------------------------------------------------------------------
/SimData/exfample_concat.sav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/exfample_concat.sav
--------------------------------------------------------------------------------
/SimData/mannwu.csv:
--------------------------------------------------------------------------------
1 | X,Y
2 | 0.7964691855978616,0.8315513738418383
3 | 0.38613933495037944,0.8318275870968661
4 | 0.3268514535642031,0.9344009585513211
5 | 0.6513147690828912,1.1494317940777896
6 | 0.819468969785563,1.0244553248606352
7 | 0.5231064601244609,0.9110235106775828
8 | 1.0807641983846155,1.0224433825702215
9 | 0.7848297385848633,0.6229589138531781
10 | 0.5809319014843609,0.661788655622314
11 | 0.4921175181941505,0.5282632308789557
12 | 0.4431780161508694,0.5937140463888293
13 | 0.8290497073840416,0.9309761238544878
14 | 0.5385722446796244,0.39210493994507517
15 | 0.15967789660956835,0.7337011726795282
16 | 0.4980442553304314,0.7308627633296438
17 | 0.8379954057320357,0.7936850976503063
18 | 0.28249173045349996,0.725830290295828
19 | 0.2754517561474925,0.6122612229724653
20 |
--------------------------------------------------------------------------------
/SimData/paired_samples_data.csv:
--------------------------------------------------------------------------------
1 | "","ids","test","score"
2 | "1","1","Pre","29.7974300770879"
3 | "2","2","Pre","42.5776151657522"
4 | "3","3","Pre","45.047165513436"
5 | "4","4","Pre","35.2705932334014"
6 | "5","5","Pre","28.5910699449006"
7 | "6","6","Pre","31.8410138175994"
8 | "7","7","Pre","34.0124734982038"
9 | "8","8","Pre","46.4892146463403"
10 | "9","9","Pre","39.9304542558338"
11 | "10","10","Pre","33.3516886942367"
12 | "11","11","Pre","42.8572053301595"
13 | "12","12","Pre","28.3413084483925"
14 | "13","13","Pre","38.6027703773846"
15 | "14","14","Pre","45.8101417162082"
16 | "15","15","Pre","38.1011318438518"
17 | "16","16","Pre","46.8308232133477"
18 | "17","17","Pre","49.4272165186362"
19 | "18","18","Pre","33.7224732943907"
20 | "19","19","Pre","33.8048755875953"
21 | "20","20","Pre","35.0653860124681"
22 | "21","21","Pre","42.7142585724282"
23 | "22","22","Pre","44.3379183133575"
24 | "23","23","Pre","46.3204259626851"
25 | "24","24","Pre","46.7992044904123"
26 | "25","25","Pre","45.6133812123124"
27 | "26","26","Pre","44.8929454246258"
28 | "27","27","Pre","40.7778858750559"
29 | "28","28","Pre","35.2048656392059"
30 | "29","29","Pre","36.0633467913913"
31 | "30","30","Pre","42.0722641297528"
32 | "31","31","Pre","48.8347425980345"
33 | "32","32","Pre","48.9536930648924"
34 | "33","33","Pre","29.7033164856218"
35 | "34","34","Pre","35.4918105192891"
36 | "35","35","Pre","47.4334023365659"
37 | "36","36","Pre","34.272218510398"
38 | "37","37","Pre","31.3600393958536"
39 | "38","38","Pre","43.0909987700964"
40 | "39","39","Pre","49.0967129385514"
41 | "40","40","Pre","50.164874181026"
42 | "41","41","Pre","42.7359490510552"
43 | "42","42","Pre","43.7262285069049"
44 | "43","43","Pre","42.8804949445025"
45 | "44","44","Pre","39.8161392622022"
46 | "45","45","Pre","22.0417828624823"
47 | "46","46","Pre","43.9437271972267"
48 | "47","47","Pre","37.838497683111"
49 | "48","48","Pre","45.2644764862028"
50 | "49","49","Pre","36.5890423205091"
51 | "50","50","Pre","31.2487399416401"
52 | "51","1","Post","36.1201415507546"
53 | "52","2","Post","48.5562726319682"
54 | "53","3","Post","52.097546912409"
55 | "54","4","Post","41.4866956581713"
56 | "55","5","Post","34.8501569526362"
57 | "56","6","Post","38.0080348022042"
58 | "57","7","Post","39.7373380205275"
59 | "58","8","Post","52.2894176934222"
60 | "59","9","Post","46.1932019642909"
61 | "60","10","Post","39.6129114395868"
62 | "61","11","Post","48.9657385270658"
63 | "62","12","Post","33.9422525397391"
64 | "63","13","Post","45.0675770713026"
65 | "64","14","Post","51.2881053220344"
66 | "65","15","Post","43.881030323511"
67 | "66","16","Post","53.5027471302151"
68 | "67","17","Post","55.5167176320205"
69 | "68","18","Post","39.9564084812573"
70 | "69","19","Post","39.8467887842345"
71 | "70","20","Post","40.6633011520263"
72 | "71","21","Post","48.4410325983485"
73 | "72","22","Post","50.3113606235816"
74 | "73","23","Post","51.2933564431331"
75 | "74","24","Post","52.4449890295368"
76 | "75","25","Post","51.7916434435655"
77 | "76","26","Post","50.7164247581178"
78 | "77","27","Post","46.6061659557517"
79 | "78","28","Post","41.4060681829761"
80 | "79","29","Post","41.8073022923197"
81 | "80","30","Post","48.1956190960739"
82 | "81","31","Post","54.294759634335"
83 | "82","32","Post","54.4767154792721"
84 | "83","33","Post","35.08191076183"
85 | "84","34","Post","41.4391049884471"
86 | "85","35","Post","53.2867412968379"
87 | "86","36","Post","40.6585197988652"
88 | "87","37","Post","37.2665270636188"
89 | "88","38","Post","49.4488029682052"
90 | "89","39","Post","55.6457987927848"
91 | "90","40","Post","55.9261047562448"
92 | "91","41","Post","48.7815702478923"
93 | "92","42","Post","49.3729900268841"
94 | "93","43","Post","49.039161029472"
95 | "94","44","Post","45.386944771065"
96 | "95","45","Post","27.6298212109051"
97 | "96","46","Post","49.9571229703613"
98 | "97","47","Post","43.7878660637685"
99 | "98","48","Post","51.2694088215512"
100 | "99","49","Post","42.5314652313058"
101 | "100","50","Post","36.9977765306218"
102 |
--------------------------------------------------------------------------------
/SimData/play_data.csv:
--------------------------------------------------------------------------------
1 | ,Subject ID,First Name,Day,Age,Response Time,Gender,Miss\Col
2 | 0,1,John,Sixth,23,0.562718714,0,
3 | 1,2,Billie,Sixth,22,,0,
4 | 2,3,Robert,Sixth,20,,0,
5 | 3,4,Don,Sixth,27,0.522960764,0,
6 | 4,5,Joseph,Sixth,21,,0,
7 | 5,6,James,Sixth,25,0.457103082,0,
8 | 6,7,Delbert,Sixth,26,,0,
9 | 7,8,Gary,Sixth,24,,0,
10 | 8,9,Scott,Sixth,27,,0,
11 | 9,10,Steve,Sixth,27,,0,
12 | 10,11,Frank,Sixth,18,,0,
13 | 11,12,Eric,Sixth,23,0.512687737,0,
14 | 12,13,Wendell,Sixth,27,,0,
15 | 13,14,James,Sixth,21,0.451782212,0,
16 | 14,15,Paul,Sixth,20,,0,
17 | 15,16,Juan,Sixth,26,0.511309398,0,
18 | 16,17,Walter,Sixth,30,0.487637403,0,
19 | 17,18,Richard,Sixth,23,0.524817046,0,
20 | 18,19,Felix,Sixth,21,0.67198927,0,
21 | 19,20,Andre,Sixth,21,0.444921165,0,
22 | 20,21,Jeffrey,Sixth,26,0.403500143,0,
23 | 21,22,Dave,Sixth,21,0.553810153,0,
24 | 22,23,James,Sixth,29,0.369941677,0,
25 | 23,24,Lemuel,Sixth,27,0.294494602,0,
26 | 24,25,Tommy,Sixth,23,0.712596037,0,
27 | 25,26,Carlos,Sixth,22,0.560689934,0,
28 | 26,27,Willie,Sixth,19,0.442679038,0,
29 | 27,28,Joseph,Sixth,19,0.467343626,0,
30 | 28,29,Everette,Sixth,25,0.695471264,0,
31 | 29,30,Marvin,Sixth,28,0.533844927,0,
32 | 30,31,Javier,Sixth,30,0.50538016,0,
33 | 31,32,Henry,Sixth,27,0.438643817,0,
34 | 32,33,Danial,Sixth,19,0.44395374,0,
35 | 33,34,Nathan,Sixth,28,0.610413705,0,
36 | 34,35,Ted,Sixth,29,0.438753873,0,
37 | 35,36,Terry,Sixth,29,0.582811696,0,
38 | 36,37,Steve,Sixth,28,0.488302597,0,
39 | 37,38,Thomas,Sixth,24,0.57080482,0,
40 | 38,39,Roger,Sixth,24,0.590357075,0,
41 | 39,40,Mohammed,Sixth,26,0.571036906,0,
42 | 40,41,Willie,Sixth,19,0.354533906,0,
43 | 41,42,Kirk,Sixth,20,0.593108219,0,
44 | 42,43,Michael,Sixth,20,0.427897422,0,
45 | 43,44,Michael,Sixth,24,0.762731285,0,
46 | 44,45,Eric,Sixth,20,0.36098658,0,
47 | 45,46,Clarence,Sixth,19,0.272340392,0,
48 | 46,47,Carlton,Sixth,23,0.483092454,0,
49 | 47,48,Luis,Sixth,18,0.597895617,0,
50 | 48,49,John,Sixth,30,0.461951379,0,
51 | 49,50,Charles,Sixth,23,0.447971024,0,
52 | 50,51,Larry,Sixth,30,0.600510185,0,
53 | 51,52,Kennith,Sixth,22,0.640767304,0,
54 | 52,53,John,Sixth,24,0.316679876,0,
55 | 53,54,David,Sixth,20,0.546059195,0,
56 | 54,55,Taylor,Sixth,20,0.420246871,0,
57 | 55,56,Michael,Sixth,23,0.503040392,0,
58 | 56,57,Wesley,Sixth,21,0.525297919,0,
59 | 57,58,Jack,Sixth,20,0.445605919,0,
60 | 58,59,Drew,Sixth,22,0.496373611,0,
61 | 59,60,Gary,Sixth,20,0.447558501,0,
62 | 60,61,Robert,Sixth,26,0.433021422,0,
63 | 61,62,Charles,Sixth,29,0.482127871,0,
64 | 62,63,Lawrence,Sixth,24,0.405422175,0,
65 | 63,64,Billy,Sixth,25,0.545988751,0,
66 | 64,65,Travis,Sixth,19,0.448253713,0,
67 | 65,66,Kelly,Sixth,21,0.4947168,0,
68 | 66,67,Johnnie,Sixth,23,0.494606185,0,
69 | 67,68,Kenneth,Sixth,25,0.565283972,0,
70 | 68,69,John,Sixth,19,0.343187861,0,
71 | 69,70,Tony,Sixth,22,0.514230118,0,
72 | 70,71,Salvatore,Sixth,30,0.500992394,0,
73 | 71,72,Jack,Sixth,23,0.453988849,0,
74 | 72,73,Jose,Sixth,28,0.482167361,0,
75 | 73,74,John,Sixth,24,0.472265694,0,
76 | 74,75,Richard,Sixth,18,0.619760804,0,
77 | 75,76,Alan,Sixth,24,0.533541241,0,
78 | 76,77,Edward,Sixth,30,0.593852241,0,
79 | 77,78,Kenny,Sixth,30,0.410937957,0,
80 | 78,79,Ian,Sixth,24,0.495909819,0,
81 | 79,80,Brian,Sixth,29,0.53085432,0,
82 | 80,81,Chad,Sixth,24,0.31734982,0,
83 | 81,82,Lowell,Sixth,19,0.424849593,0,
84 | 82,83,Jonathon,Sixth,24,0.472078896,0,
85 | 83,84,Chester,Sixth,25,0.539348838,0,
86 | 84,85,Harold,Sixth,28,0.466368183,0,
87 | 85,86,Michael,Sixth,28,0.56436449,0,
88 | 86,87,James,Sixth,23,0.66332556,0,
89 | 87,88,Charles,Sixth,18,0.64069384,0,
90 | 88,89,Arthur,Sixth,21,0.654722649,0,
91 | 89,90,Robert,Sixth,21,0.46504208,0,
92 | 90,91,William,Sixth,30,0.566551964,0,
93 | 91,92,Raymond,Sixth,25,0.623404676,0,
94 | 92,93,Michael,Sixth,18,0.405438979,0,
95 | 93,94,James,Sixth,27,0.483281774,0,
96 | 94,95,James,Sixth,22,0.462393558,0,
97 | 95,96,Jayson,Sixth,30,0.618316369,0,
98 | 96,97,Don,Sixth,24,0.573371193,0,
99 | 97,98,Joseph,Sixth,29,0.487317544,0,
100 | 98,99,Paul,Sixth,22,0.688110681,0,
101 | 99,100,Roberto,Sixth,27,0.434629409,0,
102 | 100,101,Vanessa,Sixth,25,0.511103856,1,
103 | 101,102,Alice,Sixth,23,0.497201592,1,
104 | 102,103,Josephine,Sixth,27,0.622294727,1,
105 | 103,104,Annie,Sixth,28,0.472999886,1,
106 | 104,105,Veronica,Sixth,18,0.499290188,1,
107 | 105,106,Elizabeth,Sixth,23,0.389500458,1,
108 | 106,107,Marie,Sixth,29,0.472610222,1,
109 | 107,108,Barbara,Sixth,20,,1,
110 | 108,109,Donna,Sixth,29,0.499350369,1,
111 | 109,110,Shannon,Sixth,29,0.536872124,1,
112 | 110,111,Miranda,Sixth,28,0.545481391,1,
113 | 111,112,Brianna,Sixth,22,0.452065775,1,
114 | 112,113,Willie,Sixth,25,0.39099589,1,
115 | 113,114,Rachel,Sixth,21,0.498337959,1,
116 | 114,115,Maria,Sixth,21,0.611531847,1,
117 | 115,116,Barbara,Sixth,23,0.379887383,1,
118 | 116,117,Mattie,Sixth,26,0.602499952,1,
119 | 117,118,Barbara,Sixth,22,0.536578753,1,
120 | 118,119,Nicole,Sixth,22,0.371980304,1,
121 | 119,120,Kimberly,Sixth,25,0.390025168,1,
122 | 120,121,Maya,Sixth,27,0.501221136,1,
123 | 121,122,Tammy,Sixth,21,0.590073235,1,
124 | 122,123,Marilyn,Sixth,24,0.511126481,1,
125 | 123,124,Karen,Sixth,26,0.571952987,1,
126 | 124,125,Sherri,Sixth,20,0.534468741,1,
127 | 125,126,Lisa,Sixth,22,0.42852932,1,
128 | 126,127,Ruth,Sixth,23,0.414127641,1,
129 | 127,128,Beatriz,Sixth,22,0.580891276,1,
130 | 128,129,Wilma,Sixth,25,0.412924212,1,
131 | 129,130,Alyssa,Sixth,30,0.569149052,1,
132 | 130,131,Samira,Sixth,24,0.598302259,1,
133 | 131,132,Danielle,Sixth,26,0.611940575,1,
134 | 132,133,Rachal,Sixth,30,0.45026868,1,
135 | 133,134,Candice,Sixth,30,0.495838625,1,
136 | 134,135,Yvonne,Sixth,30,0.570750252,1,
137 | 135,136,Lorraine,Sixth,19,0.443539385,1,
138 | 136,137,Minnie,Sixth,25,0.467763204,1,
139 | 137,138,Katherine,Sixth,27,0.404297243,1,
140 | 138,139,Teresa,Sixth,24,0.642122092,1,
141 | 139,140,Suzanne,Sixth,21,0.542283762,1,
142 | 140,141,Maria,Sixth,30,0.393291613,1,
143 | 141,142,Laura,Sixth,21,0.537587306,1,
144 | 142,143,Georgette,Sixth,20,0.392442361,1,
145 | 143,144,Marcia,Sixth,19,0.582951709,1,
146 | 144,145,Susie,Sixth,21,0.480000162,1,
147 | 145,146,Deanna,Sixth,18,0.494974697,1,
148 | 146,147,Harriet,Sixth,22,0.465162054,1,
149 | 147,148,Laverne,Sixth,23,0.218522403,1,
150 | 148,149,Evelyn,Sixth,27,0.525652226,1,
151 | 149,150,Jessica,Sixth,22,0.462675611,1,
152 | 150,151,Mary,Sixth,28,0.597139964,1,
153 | 151,152,Maurine,Sixth,23,0.386264728,1,
154 | 152,153,Millicent,Sixth,21,0.415395579,1,
155 | 153,154,Twila,Sixth,22,0.443432164,1,
156 | 154,155,Kim,Sixth,27,0.578319767,1,
157 | 155,156,Elida,Sixth,27,0.459525323,1,
158 | 156,157,Robin,Sixth,21,0.406894346,1,
159 | 157,158,Katrina,Sixth,23,0.574720891,1,
160 | 158,159,Christina,Sixth,23,0.447169575,1,
161 | 159,160,Ashley,Sixth,21,0.365877754,1,
162 | 160,161,Katherine,Sixth,19,0.544364647,1,
163 | 161,162,Stella,Sixth,18,0.381190813,1,
164 | 162,163,Lillian,Sixth,29,0.582703782,1,
165 | 163,164,Megan,Sixth,26,0.671295029,1,
166 | 164,165,Martha,Sixth,30,0.599985454,1,
167 | 165,166,Tamra,Sixth,22,0.542696703,1,
168 | 166,167,Barbara,Sixth,23,0.526603612,1,
169 | 167,168,Helen,Sixth,23,0.382744114,1,
170 | 168,169,Delores,Sixth,20,0.512552464,1,
171 | 169,170,Cassandra,Sixth,19,0.54454263,1,
172 | 170,171,Shawn,Sixth,20,0.541566056,1,
173 | 171,172,Diane,Sixth,23,0.311399911,1,
174 | 172,173,Lena,Sixth,26,0.424951966,1,
175 | 173,174,Renee,Sixth,29,0.484182883,1,
176 | 174,175,Linda,Sixth,20,0.426796101,1,
177 | 175,176,Brooke,Sixth,21,0.566598184,1,
178 | 176,177,Angela,Sixth,24,0.487758627,1,
179 | 177,178,Bridget,Sixth,21,0.456916202,1,
180 | 178,179,Betty,Sixth,24,0.534980963,1,
181 | 179,180,Lola,Sixth,30,0.515230754,1,
182 | 180,181,Debra,Sixth,21,0.408306786,1,
183 | 181,182,Debra,Sixth,29,0.611299711,1,
184 | 182,183,Diana,Sixth,19,0.419199251,1,
185 | 183,184,Mary,Sixth,28,0.575110068,1,
186 | 184,185,Mable,Sixth,23,0.49041574,1,
187 | 185,186,Jeanne,Sixth,30,0.304941633,1,
188 | 186,187,Sharon,Sixth,26,,1,
189 | 187,188,Lucia,Sixth,18,0.389530079,1,
190 | 188,189,Kimberly,Sixth,24,0.516507598,1,
191 | 189,190,Crystal,Sixth,19,0.379985795,1,
192 | 190,191,Esther,Sixth,25,0.359875706,1,
193 | 191,192,Della,Sixth,28,0.548737345,1,
194 | 192,193,Joy,Sixth,20,,1,
195 | 193,194,Benita,Sixth,24,0.58129823,1,
196 | 194,195,Doris,Sixth,18,0.536655845,1,
197 | 195,196,Francisca,Sixth,27,0.494657382,1,
198 | 196,197,Nia,Sixth,20,0.487755244,1,
199 | 197,198,Christina,Sixth,29,,1,
200 | 198,199,Marta,Sixth,26,0.427867482,1,
201 | 199,200,Julia,Sixth,25,0.403679545,1,
202 |
--------------------------------------------------------------------------------
/SimData/play_data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/play_data.xlsx
--------------------------------------------------------------------------------
/SimData/play_data2.dta:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/play_data2.dta
--------------------------------------------------------------------------------
/SimData/python_absolute_value.csv:
--------------------------------------------------------------------------------
1 | D,F,C,L,K
2 | -1.213999987,0.243000001,-0.145400003,-1.414999962,0.611999989
3 | -1.353999972,-0.25999999,0.218099996,1.383999944,0.559000015
4 | -1.569000006,-0.277999997,0.315699995,1.388000011,0.573000014
5 | -1.947999954,0.296999991,0.393999994,1.549999952,0.56400001
6 | -2.265000105,0.310000002,0.35589999,1.802000046,0.574000001
7 | 2.730999947,0.321999997,0.359299988,1.925999999,0.711000025
8 | -3.025000095,0.335000008,0.402500004,1.963999987,0.776000023
9 | 3.562000036,0.349999994,0.396100014,2.115999937,0.827000022
10 | 3.979000092,0.361000001,0.382200003,2.434999943,0.800000012
11 |
--------------------------------------------------------------------------------
/SimData/skiprow.csv:
--------------------------------------------------------------------------------
1 | 2018-11-24
2 | Day Six Data
3 | Erik
4 | ,ID,Name,Day,Age,Response,Gender
5 | 0,1,John,Sixth,23,0.5627187141917855,0
6 | 1,2,Billie,Sixth,22,Not Available,0
7 | 2,3,Robert,Sixth,20,Not Available,0
8 | 3,4,Don,Sixth,27,0.5229607643652396,0
9 | 4,5,Joseph,Sixth,21,Not Available,0
10 | 5,6,James,Sixth,25,0.4571030819121562,0
11 | 6,7,Delbert,Sixth,26,Not Available,0
12 | 7,8,Gary,Sixth,24,Not Available,0
13 | 8,9,Scott,Sixth,27,Not Available,0
14 | 9,10,Steve,Sixth,27,Not Available,0
15 | 10,11,Frank,Sixth,18,Not Available,0
16 | 11,12,Eric,Sixth,23,0.512687736538734,0
17 | 12,13,Wendell,Sixth,27,Not Available,0
18 | 13,14,James,Sixth,21,0.4517822116966478,0
19 | 14,15,Paul,Sixth,20,Not Available,0
20 | 15,16,Juan,Sixth,26,0.511309398445967,0
21 | 16,17,Walter,Sixth,30,0.4876374026809741,0
22 | 17,18,Richard,Sixth,23,0.5248170458806685,0
23 | 18,19,Felix,Sixth,21,0.6719892697762015,0
24 | 19,20,Andre,Sixth,21,0.4449211650987591,0
25 | 20,21,Jeffrey,Sixth,26,0.4035001434778803,0
26 | 21,22,Dave,Sixth,21,0.5538101525320848,0
27 | 22,23,James,Sixth,29,0.3699416770202328,0
28 | 23,24,Lemuel,Sixth,27,0.29449460162573504,0
29 | 24,25,Tommy,Sixth,23,0.7125960371855942,0
30 | 25,26,Carlos,Sixth,22,0.560689934295333,0
31 | 26,27,Willie,Sixth,19,0.4426790378672592,0
32 | 27,28,Joseph,Sixth,19,0.467343626114986,0
33 | 28,29,Everette,Sixth,25,0.6954712644704699,0
34 | 29,30,Marvin,Sixth,28,0.5338449267566893,0
35 | 30,31,Javier,Sixth,30,0.5053801595683928,0
36 | 31,32,Henry,Sixth,27,0.4386438165903696,0
37 | 32,33,Danial,Sixth,19,0.443953740251032,0
38 | 33,34,Nathan,Sixth,28,0.6104137051112386,0
39 | 34,35,Ted,Sixth,29,0.4387538730184034,0
40 | 35,36,Terry,Sixth,29,0.5828116958700524,0
41 | 36,37,Steve,Sixth,28,0.4883025967736782,0
42 | 37,38,Thomas,Sixth,24,0.5708048197461699,0
43 | 38,39,Roger,Sixth,24,0.5903570754206436,0
44 | 39,40,Mohammed,Sixth,26,0.5710369057808238,0
45 | 40,41,Willie,Sixth,19,0.3545339060940288,0
46 | 41,42,Kirk,Sixth,20,0.5931082193103651,0
47 | 42,43,Michael,Sixth,20,0.4278974215619132,0
48 | 43,44,Michael,Sixth,24,0.7627312850675907,0
49 | 44,45,Eric,Sixth,20,0.3609865803366528,0
50 | 45,46,Clarence,Sixth,19,0.2723403918403283,0
51 | 46,47,Carlton,Sixth,23,0.4830924544938338,0
52 | 47,48,Luis,Sixth,18,0.5978956173958363,0
53 | 48,49,John,Sixth,30,0.4619513788658993,0
54 | 49,50,Charles,Sixth,23,0.4479710238937036,0
55 | 50,51,Larry,Sixth,30,0.6005101847929761,0
56 | 51,52,Kennith,Sixth,22,0.6407673041409321,0
57 | 52,53,John,Sixth,24,0.3166798757885672,0
58 | 53,54,David,Sixth,20,0.5460591953743089,0
59 | 54,55,Taylor,Sixth,20,0.4202468709201124,0
60 | 55,56,Michael,Sixth,23,0.503040391617558,0
61 | 56,57,Wesley,Sixth,21,0.5252979188424935,0
62 | 57,58,Jack,Sixth,20,0.4456059188027668,0
63 | 58,59,Drew,Sixth,22,0.4963736106787016,0
64 | 59,60,Gary,Sixth,20,0.4475585006721042,0
65 | 60,61,Robert,Sixth,26,0.433021422000792,0
66 | 61,62,Charles,Sixth,29,0.4821278711793452,0
67 | 62,63,Lawrence,Sixth,24,0.4054221747322013,0
68 | 63,64,Billy,Sixth,25,0.5459887509348277,0
69 | 64,65,Travis,Sixth,19,0.4482537127438954,0
70 | 65,66,Kelly,Sixth,21,0.4947167997604914,0
71 | 66,67,Johnnie,Sixth,23,0.4946061853363077,0
72 | 67,68,Kenneth,Sixth,25,0.5652839716526309,0
73 | 68,69,John,Sixth,19,0.34318786073239826,0
74 | 69,70,Tony,Sixth,22,0.5142301178099664,0
75 | 70,71,Salvatore,Sixth,30,0.5009923942795725,0
76 | 71,72,Jack,Sixth,23,0.45398884881089896,0
77 | 72,73,Jose,Sixth,28,0.4821673612287138,0
78 | 73,74,John,Sixth,24,0.4722656940541789,0
79 | 74,75,Richard,Sixth,18,0.6197608040669679,0
80 | 75,76,Alan,Sixth,24,0.5335412407017036,0
81 | 76,77,Edward,Sixth,30,0.5938522409655508,0
82 | 77,78,Kenny,Sixth,30,0.41093795718540826,0
83 | 78,79,Ian,Sixth,24,0.4959098187308255,0
84 | 79,80,Brian,Sixth,29,0.5308543203711171,0
85 | 80,81,Chad,Sixth,24,0.3173498201434641,0
86 | 81,82,Lowell,Sixth,19,0.4248495932603885,0
87 | 82,83,Jonathon,Sixth,24,0.4720788961850801,0
88 | 83,84,Chester,Sixth,25,0.5393488384028237,0
89 | 84,85,Harold,Sixth,28,0.4663681827526402,0
90 | 85,86,Michael,Sixth,28,0.564364490050406,0
91 | 86,87,James,Sixth,23,0.6633255597766218,0
92 | 87,88,Charles,Sixth,18,0.6406938401660549,0
93 | 88,89,Arthur,Sixth,21,0.6547226491561557,0
94 | 89,90,Robert,Sixth,21,0.4650420803037942,0
95 | 90,91,William,Sixth,30,0.5665519641804087,0
96 | 91,92,Raymond,Sixth,25,0.6234046756685127,0
97 | 92,93,Michael,Sixth,18,0.4054389794121322,0
98 | 93,94,James,Sixth,27,0.4832817739075767,0
99 | 94,95,James,Sixth,22,0.4623935581996443,0
100 | 95,96,Jayson,Sixth,30,0.6183163685997498,0
101 | 96,97,Don,Sixth,24,0.5733711927951894,0
102 | 97,98,Joseph,Sixth,29,0.4873175435671538,0
103 | 98,99,Paul,Sixth,22,0.688110681439846,0
104 | 99,100,Roberto,Sixth,27,0.434629408779397,0
105 | 100,101,Vanessa,Sixth,25,0.5111038562077044,1
106 | 101,102,Alice,Sixth,23,0.4972015920269251,1
107 | 102,103,Josephine,Sixth,27,0.6222947266717184,1
108 | 103,104,Annie,Sixth,28,0.4729998858439837,1
109 | 104,105,Veronica,Sixth,18,0.4992901882731911,1
110 | 105,106,Elizabeth,Sixth,23,0.3895004576945725,1
111 | 106,107,Marie,Sixth,29,0.4726102218311762,1
112 | 107,108,Barbara,Sixth,20,0.465480091459964,1
113 | 108,109,Donna,Sixth,29,0.4993503685979966,1
114 | 109,110,Shannon,Sixth,29,0.5368721241098889,1
115 | 110,111,Miranda,Sixth,28,0.5454813912263198,1
116 | 111,112,Brianna,Sixth,22,0.452065775094302,1
117 | 112,113,Willie,Sixth,25,0.39099589041022575,1
118 | 113,114,Rachel,Sixth,21,0.4983379588870162,1
119 | 114,115,Maria,Sixth,21,0.6115318473116368,1
120 | 115,116,Barbara,Sixth,23,0.3798873826666749,1
121 | 116,117,Mattie,Sixth,26,0.6024999519165927,1
122 | 117,118,Barbara,Sixth,22,0.5365787533599118,1
123 | 118,119,Nicole,Sixth,22,0.3719803042196256,1
124 | 119,120,Kimberly,Sixth,25,0.3900251680666901,1
125 | 120,121,Maya,Sixth,27,0.5012211361474402,1
126 | 121,122,Tammy,Sixth,21,0.5900732351352194,1
127 | 122,123,Marilyn,Sixth,24,0.5111264805624623,1
128 | 123,124,Karen,Sixth,26,0.5719529873473642,1
129 | 124,125,Sherri,Sixth,20,0.5344687407956776,1
130 | 125,126,Lisa,Sixth,22,0.4285293196734672,1
131 | 126,127,Ruth,Sixth,23,0.4141276409539065,1
132 | 127,128,Beatriz,Sixth,22,0.580891276391413,1
133 | 128,129,Wilma,Sixth,25,0.41292421225187,1
134 | 129,130,Alyssa,Sixth,30,0.5691490519310829,1
135 | 130,131,Samira,Sixth,24,0.5983022594122839,1
136 | 131,132,Danielle,Sixth,26,0.6119405745912091,1
137 | 132,133,Rachal,Sixth,30,0.4502686799797943,1
138 | 133,134,Candice,Sixth,30,0.4958386248306951,1
139 | 134,135,Yvonne,Sixth,30,0.5707502520010675,1
140 | 135,136,Lorraine,Sixth,19,0.4435393854940667,1
141 | 136,137,Minnie,Sixth,25,0.4677632036651698,1
142 | 137,138,Katherine,Sixth,27,0.4042972425845818,1
143 | 138,139,Teresa,Sixth,24,0.6421220921833651,1
144 | 139,140,Suzanne,Sixth,21,0.5422837619955311,1
145 | 140,141,Maria,Sixth,30,0.39329161255034334,1
146 | 141,142,Laura,Sixth,21,0.5375873055372921,1
147 | 142,143,Georgette,Sixth,20,0.392442361268742,1
148 | 143,144,Marcia,Sixth,19,0.5829517088661433,1
149 | 144,145,Susie,Sixth,21,0.4800001615471727,1
150 | 145,146,Deanna,Sixth,18,0.4949746972751772,1
151 | 146,147,Harriet,Sixth,22,0.4651620538037444,1
152 | 147,148,Laverne,Sixth,23,0.21852240343463564,1
153 | 148,149,Evelyn,Sixth,27,0.5256522259273075,1
154 | 149,150,Jessica,Sixth,22,0.4626756113213673,1
155 | 150,151,Mary,Sixth,28,0.5971399636524906,1
156 | 151,152,Maurine,Sixth,23,0.3862647280799457,1
157 | 152,153,Millicent,Sixth,21,0.41539557943222,1
158 | 153,154,Twila,Sixth,22,0.4434321643778448,1
159 | 154,155,Kim,Sixth,27,0.5783197667230191,1
160 | 155,156,Elida,Sixth,27,0.4595253229609275,1
161 | 156,157,Robin,Sixth,21,0.406894345549398,1
162 | 157,158,Katrina,Sixth,23,0.574720890916179,1
163 | 158,159,Christina,Sixth,23,0.4471695747522068,1
164 | 159,160,Ashley,Sixth,21,0.3658777537307304,1
165 | 160,161,Katherine,Sixth,19,0.5443646468409017,1
166 | 161,162,Stella,Sixth,18,0.3811908133421368,1
167 | 162,163,Lillian,Sixth,29,0.5827037820459395,1
168 | 163,164,Megan,Sixth,26,0.6712950290615973,1
169 | 164,165,Martha,Sixth,30,0.5999854536629398,1
170 | 165,166,Tamra,Sixth,22,0.5426967026078454,1
171 | 166,167,Barbara,Sixth,23,0.5266036117738924,1
172 | 167,168,Helen,Sixth,23,0.3827441141401961,1
173 | 168,169,Delores,Sixth,20,0.5125524640036196,1
174 | 169,170,Cassandra,Sixth,19,0.5445426304713614,1
175 | 170,171,Shawn,Sixth,20,0.5415660559256122,1
176 | 171,172,Diane,Sixth,23,0.31139991061482986,1
177 | 172,173,Lena,Sixth,26,0.4249519659560316,1
178 | 173,174,Renee,Sixth,29,0.4841828832501326,1
179 | 174,175,Linda,Sixth,20,0.4267961009247867,1
180 | 175,176,Brooke,Sixth,21,0.5665981844310021,1
181 | 176,177,Angela,Sixth,24,0.4877586266951791,1
182 | 177,178,Bridget,Sixth,21,0.4569162017466531,1
183 | 178,179,Betty,Sixth,24,0.534980963105169,1
184 | 179,180,Lola,Sixth,30,0.5152307543228434,1
185 | 180,181,Debra,Sixth,21,0.40830678550869137,1
186 | 181,182,Debra,Sixth,29,0.6112997110674216,1
187 | 182,183,Diana,Sixth,19,0.41919925141276265,1
188 | 183,184,Mary,Sixth,28,0.5751100677634319,1
189 | 184,185,Mable,Sixth,23,0.4904157402345066,1
190 | 185,186,Jeanne,Sixth,30,0.3049416329938862,1
191 | 186,187,Sharon,Sixth,26,0.4326362856392755,1
192 | 187,188,Lucia,Sixth,18,0.3895300791317597,1
193 | 188,189,Kimberly,Sixth,24,0.5165075984515924,1
194 | 189,190,Crystal,Sixth,19,0.3799857945139376,1
195 | 190,191,Esther,Sixth,25,0.3598757061536821,1
196 | 191,192,Della,Sixth,28,0.5487373450086704,1
197 | 192,193,Joy,Sixth,20,0.5711191682655571,1
198 | 193,194,Benita,Sixth,24,0.5812982298969092,1
199 | 194,195,Doris,Sixth,18,0.5366558449616664,1
200 | 195,196,Francisca,Sixth,27,0.4946573817954197,1
201 | 196,197,Nia,Sixth,20,0.4877552435335766,1
202 | 197,198,Christina,Sixth,29,0.4994693732595509,1
203 | 198,199,Marta,Sixth,26,0.4278674824865973,1
204 | 199,200,Julia,Sixth,25,0.4036795449925428,1
205 |
--------------------------------------------------------------------------------
/SimData/survey_1.sav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/survey_1.sav
--------------------------------------------------------------------------------
/SimData/survey_2.sav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/SimData/survey_2.sav
--------------------------------------------------------------------------------
/YT/paired_samples_t-test_python_scipy_pingouin.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "This is the Jupyter Notebook for the [YouTube tutorial](https://youtu.be/16Sa31mbTWE) and blog post about how to carry out the paired/dependent samples t-test in Python using the two packages SciPy and Pingouin. Note if you fork the entire git repository you can run the script as it is as the example dataset is also found in this repo (i.e., here). "
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "## Import Data from CSV\n",
15 | "First, we start out by importing the .csv file using Pandas:"
16 | ]
17 | },
18 | {
19 | "cell_type": "code",
20 | "execution_count": 1,
21 | "metadata": {},
22 | "outputs": [
23 | {
24 | "data": {
25 | "text/html": [
26 | "\n",
27 | "\n",
40 | "
\n",
41 | " \n",
42 | " \n",
43 | " | \n",
44 | " ids | \n",
45 | " test | \n",
46 | " score | \n",
47 | "
\n",
48 | " \n",
49 | " \n",
50 | " \n",
51 | " 1 | \n",
52 | " 1 | \n",
53 | " Pre | \n",
54 | " 29.797430 | \n",
55 | "
\n",
56 | " \n",
57 | " 2 | \n",
58 | " 2 | \n",
59 | " Pre | \n",
60 | " 42.577615 | \n",
61 | "
\n",
62 | " \n",
63 | " 3 | \n",
64 | " 3 | \n",
65 | " Pre | \n",
66 | " 45.047166 | \n",
67 | "
\n",
68 | " \n",
69 | " 4 | \n",
70 | " 4 | \n",
71 | " Pre | \n",
72 | " 35.270593 | \n",
73 | "
\n",
74 | " \n",
75 | " 5 | \n",
76 | " 5 | \n",
77 | " Pre | \n",
78 | " 28.591070 | \n",
79 | "
\n",
80 | " \n",
81 | "
\n",
82 | "
"
83 | ],
84 | "text/plain": [
85 | " ids test score\n",
86 | "1 1 Pre 29.797430\n",
87 | "2 2 Pre 42.577615\n",
88 | "3 3 Pre 45.047166\n",
89 | "4 4 Pre 35.270593\n",
90 | "5 5 Pre 28.591070"
91 | ]
92 | },
93 | "execution_count": 1,
94 | "metadata": {},
95 | "output_type": "execute_result"
96 | }
97 | ],
98 | "source": [
99 | "import pandas as pd\n",
100 | "\n",
101 | "\n",
102 | "df = pd.read_csv('./SimData/paired_samples_data.csv',\n",
103 | " index_col=0)\n",
104 | "\n",
105 | "df.head()"
106 | ]
107 | },
108 | {
109 | "cell_type": "markdown",
110 | "metadata": {},
111 | "source": [
112 | "## Paired T-test with SciPy"
113 | ]
114 | },
115 | {
116 | "cell_type": "code",
117 | "execution_count": 2,
118 | "metadata": {},
119 | "outputs": [
120 | {
121 | "data": {
122 | "text/plain": [
123 | "Ttest_relResult(statistic=115.43840005074212, pvalue=2.349518677786564e-61)"
124 | ]
125 | },
126 | "execution_count": 2,
127 | "metadata": {},
128 | "output_type": "execute_result"
129 | }
130 | ],
131 | "source": [
132 | "from scipy.stats import ttest_rel\n",
133 | "\n",
134 | "b = df.query('test == \"Pre\"')['score']\n",
135 | "a = df.query('test == \"Post\"')['score']\n",
136 | "\n",
137 | "ttest_rel(a, b)"
138 | ]
139 | },
140 | {
141 | "cell_type": "markdown",
142 | "metadata": {},
143 | "source": [
144 | "## Dependent T-test with Pingouin"
145 | ]
146 | },
147 | {
148 | "cell_type": "code",
149 | "execution_count": 3,
150 | "metadata": {},
151 | "outputs": [
152 | {
153 | "data": {
154 | "text/html": [
155 | "\n",
156 | "\n",
169 | "
\n",
170 | " \n",
171 | " \n",
172 | " | \n",
173 | " T | \n",
174 | " dof | \n",
175 | " tail | \n",
176 | " p-val | \n",
177 | " CI95% | \n",
178 | " cohen-d | \n",
179 | " BF10 | \n",
180 | " power | \n",
181 | "
\n",
182 | " \n",
183 | " \n",
184 | " \n",
185 | " T-test | \n",
186 | " 115.4384 | \n",
187 | " 49 | \n",
188 | " two-sided | \n",
189 | " 2.349519e-61 | \n",
190 | " [5.86, 6.07] | \n",
191 | " 0.881345 | \n",
192 | " 2.437e+57 | \n",
193 | " 1.0 | \n",
194 | "
\n",
195 | " \n",
196 | "
\n",
197 | "
"
198 | ],
199 | "text/plain": [
200 | " T dof tail p-val CI95% cohen-d \\\n",
201 | "T-test 115.4384 49 two-sided 2.349519e-61 [5.86, 6.07] 0.881345 \n",
202 | "\n",
203 | " BF10 power \n",
204 | "T-test 2.437e+57 1.0 "
205 | ]
206 | },
207 | "execution_count": 3,
208 | "metadata": {},
209 | "output_type": "execute_result"
210 | }
211 | ],
212 | "source": [
213 | "import pingouin as pt\n",
214 | "\n",
215 | "pt.ttest(a, b, paired=True)"
216 | ]
217 | },
218 | {
219 | "cell_type": "markdown",
220 | "metadata": {},
221 | "source": [
222 | "## Calculate Cohen's D"
223 | ]
224 | },
225 | {
226 | "cell_type": "code",
227 | "execution_count": 4,
228 | "metadata": {},
229 | "outputs": [
230 | {
231 | "ename": "NameError",
232 | "evalue": "name 'xb' is not defined",
233 | "output_type": "error",
234 | "traceback": [
235 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
236 | "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
237 | "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mm2\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mb\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmean\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 6\u001b[1;33m \u001b[0msd_pol\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msqrt\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstd\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m2\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mxb\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstd\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 7\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 8\u001b[0m \u001b[0md\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mm1\u001b[0m \u001b[1;33m-\u001b[0m \u001b[0mm2\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m/\u001b[0m\u001b[0msd_pol\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
238 | "\u001b[1;31mNameError\u001b[0m: name 'xb' is not defined"
239 | ]
240 | }
241 | ],
242 | "source": [
243 | "import numpy as np\n",
244 | "\n",
245 | "m1 = a.mean()\n",
246 | "m2 = b.mean()\n",
247 | "\n",
248 | "sd_pol = np.sqrt(((a.std()**2 + xb.std()**2)/2))\n",
249 | "\n",
250 | "d = (m1 - m2)/sd_pol\n",
251 | "print(d)"
252 | ]
253 | },
254 | {
255 | "cell_type": "code",
256 | "execution_count": null,
257 | "metadata": {},
258 | "outputs": [],
259 | "source": [
260 | "import seaborn as sns\n",
261 | "\n",
262 | "ax=sns.lineplot('test', 'score',\n",
263 | " ci=False, data=df)\n",
264 | "sns.despine()\n",
265 | "ax.set(xlabel=\"Test\", ylabel = \"Depression\")"
266 | ]
267 | },
268 | {
269 | "cell_type": "code",
270 | "execution_count": null,
271 | "metadata": {},
272 | "outputs": [],
273 | "source": []
274 | }
275 | ],
276 | "metadata": {
277 | "kernelspec": {
278 | "display_name": "Python 3",
279 | "language": "python",
280 | "name": "python3"
281 | },
282 | "language_info": {
283 | "codemirror_mode": {
284 | "name": "ipython",
285 | "version": 3
286 | },
287 | "file_extension": ".py",
288 | "mimetype": "text/x-python",
289 | "name": "python",
290 | "nbconvert_exporter": "python",
291 | "pygments_lexer": "ipython3",
292 | "version": "3.8.5"
293 | }
294 | },
295 | "nbformat": 4,
296 | "nbformat_minor": 4
297 | }
298 |
--------------------------------------------------------------------------------
/convert_html_jupyter_notebook_tutorial.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "## How to Convert HTML to .ipynb\n",
8 | "This is the code example used for the blog post [https://www.marsja.se/converting-html-to-a-jupyter-notebook/](https://www.marsja.se/converting-html-to-a-jupyter-notebook/) in which we learn how to convert code chunks from a webpage to a Jupyter notebook."
9 | ]
10 | },
11 | {
12 | "cell_type": "code",
13 | "execution_count": 1,
14 | "metadata": {},
15 | "outputs": [],
16 | "source": [
17 | "from bs4 import BeautifulSoup\n",
18 | "import json\n",
19 | "import urllib\n",
20 | "\n",
21 | "url = 'https://www.marsja.se/python-manova-made-easy-using-statsmodels/'\n",
22 | "\n",
23 | "headers = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11'\\\n",
24 | " '(KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',\n",
25 | " 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n",
26 | " 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',\n",
27 | " 'Accept-Encoding': 'none',\n",
28 | " 'Accept-Language': 'en-US,en;q=0.8',\n",
29 | " 'Connection': 'keep-alive'}"
30 | ]
31 | },
32 | {
33 | "cell_type": "code",
34 | "execution_count": 2,
35 | "metadata": {},
36 | "outputs": [],
37 | "source": [
38 | "req = urllib.request.Request(url, headers=headers)\n",
39 | "page = urllib.request.urlopen(req)\n",
40 | "text = page.read()"
41 | ]
42 | },
43 | {
44 | "cell_type": "code",
45 | "execution_count": 3,
46 | "metadata": {},
47 | "outputs": [],
48 | "source": [
49 | "soup = BeautifulSoup(text, 'lxml')"
50 | ]
51 | },
52 | {
53 | "cell_type": "code",
54 | "execution_count": 10,
55 | "metadata": {},
56 | "outputs": [],
57 | "source": [
58 | "create_nb = {'nbformat': 4, 'nbformat_minor': 2, \n",
59 | " 'cells': [], 'metadata': \n",
60 | " {\"kernelspec\": \n",
61 | " {\"display_name\": \"Python 3\", \n",
62 | " \"language\": \"python\", \"name\": \"python3\"\n",
63 | " }}}\n",
64 | "\n",
65 | "def get_data(soup, content_class):\n",
66 | " for div in soup.find_all('div', \n",
67 | " attrs={'class': content_class}):\n",
68 | " \n",
69 | " code_chunks = div.find_all('code')\n",
70 | " \n",
71 | " for chunk in code_chunks:\n",
72 | " cell_text = ' '\n",
73 | " cell = {}\n",
74 | " cell['metadata'] = {}\n",
75 | " cell['outputs'] = []\n",
76 | " cell['source'] = [chunk.get_text()]\n",
77 | " cell['execution_count'] = None\n",
78 | " cell['cell_type'] = 'code'\n",
79 | " create_nb['cells'].append(cell)\n",
80 | "\n",
81 | "get_data(soup, 'post-content')\n",
82 | "\n",
83 | "with open('Python_MANOVA.ipynb', 'w') as jynotebook:\n",
84 | " jynotebook.write(json.dumps(create_nb))"
85 | ]
86 | },
87 | {
88 | "cell_type": "code",
89 | "execution_count": 9,
90 | "metadata": {},
91 | "outputs": [
92 | {
93 | "data": {
94 | "text/plain": [
95 | "{'nbformat': 4,\n",
96 | " 'nbformat_minor': 2,\n",
97 | " 'cells': [{'metadata': {},\n",
98 | " 'outputs': [],\n",
99 | " 'source': ['import pandas as pd\\nfrom statsmodels.multivariate.manova import MANOVA'],\n",
100 | " 'execution_count': None,\n",
101 | " 'cell_type': 'code'},\n",
102 | " {'metadata': {},\n",
103 | " 'outputs': [],\n",
104 | " 'source': ['url = \\'https://vincentarelbundock.github.io/Rdatasets/csv/datasets/iris.csv\\'\\ndf = pd.read_csv(url, index_col=0)\\ndf.columns = df.columns.str.replace(\".\", \"_\")\\ndf.head()'],\n",
105 | " 'execution_count': None,\n",
106 | " 'cell_type': 'code'},\n",
107 | " {'metadata': {},\n",
108 | " 'outputs': [],\n",
109 | " 'source': [\"maov = MANOVA.from_formula('Sepal_Length + Sepal_Width + \\\\\\n Petal_Length + Petal_Width ~ Species', data=df)\"],\n",
110 | " 'execution_count': None,\n",
111 | " 'cell_type': 'code'},\n",
112 | " {'metadata': {},\n",
113 | " 'outputs': [],\n",
114 | " 'source': ['print(maov.mv_test())'],\n",
115 | " 'execution_count': None,\n",
116 | " 'cell_type': 'code'}],\n",
117 | " 'metadata': {'kernelspec': {'display_name': 'Python 3',\n",
118 | " 'language': 'python',\n",
119 | " 'name': 'python3'}}}"
120 | ]
121 | },
122 | "execution_count": 9,
123 | "metadata": {},
124 | "output_type": "execute_result"
125 | }
126 | ],
127 | "source": [
128 | "create_nb"
129 | ]
130 | },
131 | {
132 | "cell_type": "code",
133 | "execution_count": null,
134 | "metadata": {},
135 | "outputs": [],
136 | "source": []
137 | }
138 | ],
139 | "metadata": {
140 | "kernelspec": {
141 | "display_name": "Python 3",
142 | "language": "python",
143 | "name": "python3"
144 | },
145 | "language_info": {
146 | "codemirror_mode": {
147 | "name": "ipython",
148 | "version": 3
149 | },
150 | "file_extension": ".py",
151 | "mimetype": "text/x-python",
152 | "name": "python",
153 | "nbconvert_exporter": "python",
154 | "pygments_lexer": "ipython3",
155 | "version": "3.7.3"
156 | }
157 | },
158 | "nbformat": 4,
159 | "nbformat_minor": 2
160 | }
161 |
--------------------------------------------------------------------------------
/convert_numpy_float_array_to_integer_array_Python.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "This is the code examples found in a blog post about converting float to integer array ([https://www.marsja.se/how-to-convert-a-float-array-to-an-integer-array-in-python-with-numpy/](https://www.marsja.se/how-to-convert-a-float-array-to-an-integer-array-in-python-with-numpy/). "
8 | ]
9 | },
10 | {
11 | "cell_type": "code",
12 | "execution_count": 1,
13 | "metadata": {},
14 | "outputs": [],
15 | "source": [
16 | "import numpy as np\n",
17 | "\n",
18 | "\n",
19 | "oned = np.array([0.1, 0.3, 0.4, \n",
20 | " 0.6, -1.1, 0.3])\n",
21 | "\n",
22 | "twod = np.array([[ 0.3, 1.2, 2.4, 3.1, 4.3],\n",
23 | " [ 5.9, 6.8, 7.6, 8.5, 9.2],\n",
24 | " [10.11, 11.1, 12.23, 13.2, 14.2],\n",
25 | " [15.2, 16.4, 17.1, 18.1, 19.1]])"
26 | ]
27 | },
28 | {
29 | "cell_type": "code",
30 | "execution_count": 2,
31 | "metadata": {},
32 | "outputs": [
33 | {
34 | "data": {
35 | "text/plain": [
36 | "array([ 0.1, 0.3, 0.4, 0.6, -1.1, 0.3])"
37 | ]
38 | },
39 | "metadata": {},
40 | "output_type": "display_data"
41 | },
42 | {
43 | "data": {
44 | "text/plain": [
45 | "dtype('float64')"
46 | ]
47 | },
48 | "metadata": {},
49 | "output_type": "display_data"
50 | }
51 | ],
52 | "source": [
53 | "display(oned)\n",
54 | "display(oned.dtype)"
55 | ]
56 | },
57 | {
58 | "cell_type": "markdown",
59 | "metadata": {},
60 | "source": [
61 | "## Converting a Float Array to Int\n",
62 | "Here's how to convert the float array to an integer array:"
63 | ]
64 | },
65 | {
66 | "cell_type": "code",
67 | "execution_count": 3,
68 | "metadata": {},
69 | "outputs": [
70 | {
71 | "data": {
72 | "text/plain": [
73 | "array([ 0, 0, 0, 0, -1, 0])"
74 | ]
75 | },
76 | "metadata": {},
77 | "output_type": "display_data"
78 | },
79 | {
80 | "data": {
81 | "text/plain": [
82 | "dtype('int32')"
83 | ]
84 | },
85 | "metadata": {},
86 | "output_type": "display_data"
87 | }
88 | ],
89 | "source": [
90 | "# convert array to integer python\n",
91 | "oned_int = oned.astype(int)\n",
92 | "display(oned_int)\n",
93 | "display(oned_int.dtype)"
94 | ]
95 | },
96 | {
97 | "cell_type": "markdown",
98 | "metadata": {},
99 | "source": [
100 | "## 2-d Array\n",
101 | "The same method, as above, can be applied to a n-way array. Here's how to do it on a 2-d array:"
102 | ]
103 | },
104 | {
105 | "cell_type": "code",
106 | "execution_count": 4,
107 | "metadata": {},
108 | "outputs": [
109 | {
110 | "data": {
111 | "text/plain": [
112 | "array([[ 0, 1, 2, 3, 4],\n",
113 | " [ 5, 6, 7, 8, 9],\n",
114 | " [10, 11, 12, 13, 14],\n",
115 | " [15, 16, 17, 18, 19]])"
116 | ]
117 | },
118 | "metadata": {},
119 | "output_type": "display_data"
120 | },
121 | {
122 | "data": {
123 | "text/plain": [
124 | "dtype('int32')"
125 | ]
126 | },
127 | "metadata": {},
128 | "output_type": "display_data"
129 | }
130 | ],
131 | "source": [
132 | "twod_int = twod.astype(int)\n",
133 | "display(twod_int)\n",
134 | "display(twod_int.dtype)"
135 | ]
136 | },
137 | {
138 | "cell_type": "markdown",
139 | "metadata": {},
140 | "source": [
141 | "## Rounding Before Converting\n",
142 | "Here's how to round the numbers BEFORE converting the float numbers to integer:"
143 | ]
144 | },
145 | {
146 | "cell_type": "code",
147 | "execution_count": 5,
148 | "metadata": {},
149 | "outputs": [
150 | {
151 | "data": {
152 | "text/plain": [
153 | "array([ 0, 0, 0, 1, -1, 0])"
154 | ]
155 | },
156 | "metadata": {},
157 | "output_type": "display_data"
158 | },
159 | {
160 | "data": {
161 | "text/plain": [
162 | "dtype('int32')"
163 | ]
164 | },
165 | "metadata": {},
166 | "output_type": "display_data"
167 | }
168 | ],
169 | "source": [
170 | "oned = np.array([0.1, 0.3, 0.4, \n",
171 | " 0.6, -1.1, 0.3])\n",
172 | "\n",
173 | "oned = np.around(oned)\n",
174 | "\n",
175 | "# numpy convert to int\n",
176 | "oned_int = oned.astype(int)\n",
177 | "display(oned_int)\n",
178 | "display(oned_int.dtype)"
179 | ]
180 | },
181 | {
182 | "cell_type": "markdown",
183 | "metadata": {},
184 | "source": [
185 | "## Ceil:"
186 | ]
187 | },
188 | {
189 | "cell_type": "code",
190 | "execution_count": 6,
191 | "metadata": {},
192 | "outputs": [
193 | {
194 | "data": {
195 | "text/plain": [
196 | "array([ 1, 1, 1, 1, -1, 1])"
197 | ]
198 | },
199 | "metadata": {},
200 | "output_type": "display_data"
201 | },
202 | {
203 | "data": {
204 | "text/plain": [
205 | "dtype('int32')"
206 | ]
207 | },
208 | "metadata": {},
209 | "output_type": "display_data"
210 | }
211 | ],
212 | "source": [
213 | "oned = np.array([0.1, 0.3, 0.4, \n",
214 | " 0.6, -1.1, 0.3])\n",
215 | "\n",
216 | "oned = np.ceil(oned)\n",
217 | "\n",
218 | "# numpy float to int \n",
219 | "oned_int = oned.astype(int)\n",
220 | "display(oned_int)\n",
221 | "display(oned_int.dtype)"
222 | ]
223 | },
224 | {
225 | "cell_type": "markdown",
226 | "metadata": {},
227 | "source": [
228 | "## Floor:"
229 | ]
230 | },
231 | {
232 | "cell_type": "code",
233 | "execution_count": 7,
234 | "metadata": {},
235 | "outputs": [
236 | {
237 | "data": {
238 | "text/plain": [
239 | "array([ 0, 0, 0, 0, -2, 0])"
240 | ]
241 | },
242 | "metadata": {},
243 | "output_type": "display_data"
244 | },
245 | {
246 | "data": {
247 | "text/plain": [
248 | "dtype('int32')"
249 | ]
250 | },
251 | "metadata": {},
252 | "output_type": "display_data"
253 | }
254 | ],
255 | "source": [
256 | "oned = np.array([0.1, 0.3, 0.4, \n",
257 | " 0.6, -1.1, 0.3])\n",
258 | "\n",
259 | "oned = np.floor(oned)\n",
260 | "\n",
261 | "# numpy float to int \n",
262 | "oned_int = oned.astype(int)\n",
263 | "display(oned_int)\n",
264 | "display(oned_int.dtype)"
265 | ]
266 | },
267 | {
268 | "cell_type": "code",
269 | "execution_count": null,
270 | "metadata": {},
271 | "outputs": [],
272 | "source": []
273 | }
274 | ],
275 | "metadata": {
276 | "kernelspec": {
277 | "display_name": "Python 3",
278 | "language": "python",
279 | "name": "python3"
280 | },
281 | "language_info": {
282 | "codemirror_mode": {
283 | "name": "ipython",
284 | "version": 3
285 | },
286 | "file_extension": ".py",
287 | "mimetype": "text/x-python",
288 | "name": "python",
289 | "nbconvert_exporter": "python",
290 | "pygments_lexer": "ipython3",
291 | "version": "3.8.3"
292 | }
293 | },
294 | "nbformat": 4,
295 | "nbformat_minor": 4
296 | }
297 |
--------------------------------------------------------------------------------
/descriptive_stats_using_numpy_python.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 1,
6 | "metadata": {},
7 | "outputs": [
8 | {
9 | "name": "stderr",
10 | "output_type": "stream",
11 | "text": [
12 | "C:\\Users\\erima96\\.conda\\envs\\RPY3\\lib\\site-packages\\ipykernel_launcher.py:4: VisibleDeprecationWarning: Reading unicode strings without specifying the encoding argument is deprecated. Set the encoding, use None for the system default.\n",
13 | " after removing the cwd from sys.path.\n"
14 | ]
15 | }
16 | ],
17 | "source": [
18 | "import numpy as np\n",
19 | "\n",
20 | "data_file = 'https://vincentarelbundock.github.io/Rdatasets/csv/datasets/ToothGrowth.csv'\n",
21 | "data = np.genfromtxt(data_file, names=True,\n",
22 | " delimiter=\",\", dtype=None)"
23 | ]
24 | },
25 | {
26 | "cell_type": "code",
27 | "execution_count": 3,
28 | "metadata": {},
29 | "outputs": [],
30 | "source": [
31 | "summary_stats = []\n",
32 | "for supp_lvl in np.unique(data['supp']):\n",
33 | " \n",
34 | " for dose_lvl in np.unique(data['dose']):\n",
35 | " \n",
36 | " # Subsetting\n",
37 | " data_to_sum = data[(data['supp'] == supp_lvl) & (data['dose'] == dose_lvl)]\n",
38 | " # Calculating the descriptives\n",
39 | " mean = data_to_sum['len'].mean()\n",
40 | " sd = data_to_sum['len'].std()\n",
41 | " max_supp = data_to_sum['len'].max()\n",
42 | " min_supp = data_to_sum['len'].min()\n",
43 | " ps = np.percentile(data_to_sum['len'], [25, 75] )\n",
44 | " summary_stats.append((mean, sd, max_supp, min_supp, ps[0], ps[1], supp_lvl, dose_lvl))"
45 | ]
46 | },
47 | {
48 | "cell_type": "code",
49 | "execution_count": 4,
50 | "metadata": {},
51 | "outputs": [
52 | {
53 | "name": "stdout",
54 | "output_type": "stream",
55 | "text": [
56 | "[[b'13.229999999999999' b'4.230850978231212' b'21.5' b'8.2' b'9.7'\n",
57 | " b'16.175' b'\"OJ\"' b'0.5']\n",
58 | " [b'22.7' b'3.7102560558538276' b'27.3' b'14.5' b'20.3'\n",
59 | " b'25.650000000000002' b'\"OJ\"' b'1.0']\n",
60 | " [b'26.060000000000002' b'2.5188092424794695' b'30.9' b'22.4' b'24.575'\n",
61 | " b'27.075000000000003' b'\"OJ\"' b'2.0']\n",
62 | " [b'7.9799999999999995' b'2.605686090073015' b'11.5' b'4.2'\n",
63 | " b'5.949999999999999' b'10.899999999999999' b'\"VC\"' b'0.5']\n",
64 | " [b'16.770000000000003' b'2.386231338324095' b'22.5' b'13.6'\n",
65 | " b'15.274999999999999' b'17.3' b'\"VC\"' b'1.0']\n",
66 | " [b'26.139999999999997' b'4.551527216220946' b'33.9' b'18.5' b'23.375'\n",
67 | " b'28.8' b'\"VC\"' b'2.0']]\n"
68 | ]
69 | }
70 | ],
71 | "source": [
72 | "results = np.array(summary_stats, dtype=None)\n",
73 | "np.set_printoptions(suppress=True)\n",
74 | "print(results)"
75 | ]
76 | },
77 | {
78 | "cell_type": "code",
79 | "execution_count": null,
80 | "metadata": {},
81 | "outputs": [],
82 | "source": []
83 | }
84 | ],
85 | "metadata": {
86 | "kernelspec": {
87 | "display_name": "Python 3",
88 | "language": "python",
89 | "name": "python3"
90 | },
91 | "language_info": {
92 | "codemirror_mode": {
93 | "name": "ipython",
94 | "version": 3
95 | },
96 | "file_extension": ".py",
97 | "mimetype": "text/x-python",
98 | "name": "python",
99 | "nbconvert_exporter": "python",
100 | "pygments_lexer": "ipython3",
101 | "version": "3.7.3"
102 | }
103 | },
104 | "nbformat": 4,
105 | "nbformat_minor": 2
106 | }
107 |
--------------------------------------------------------------------------------
/example_sheets2.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/example_sheets2.xlsx
--------------------------------------------------------------------------------
/how_to_read_xlsx_files_in_Python_using_pylightxl.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 3,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "import pylightxl as xl\n",
10 | "# https://pylightxl.readthedocs.io/en/latest/quickstart.html#access-worksheet-and-cell-data"
11 | ]
12 | },
13 | {
14 | "cell_type": "code",
15 | "execution_count": 6,
16 | "metadata": {},
17 | "outputs": [
18 | {
19 | "data": {
20 | "text/plain": [
21 | "pylightxl.Database.Worksheet"
22 | ]
23 | },
24 | "execution_count": 6,
25 | "metadata": {},
26 | "output_type": "execute_result"
27 | }
28 | ],
29 | "source": [
30 | "db = xl.readxl('example_sheets2.xlsx')\n",
31 | "db.ws('Session1')"
32 | ]
33 | },
34 | {
35 | "cell_type": "code",
36 | "execution_count": null,
37 | "metadata": {},
38 | "outputs": [],
39 | "source": []
40 | }
41 | ],
42 | "metadata": {
43 | "kernelspec": {
44 | "display_name": "Python 3",
45 | "language": "python",
46 | "name": "python3"
47 | },
48 | "language_info": {
49 | "codemirror_mode": {
50 | "name": "ipython",
51 | "version": 3
52 | },
53 | "file_extension": ".py",
54 | "mimetype": "text/x-python",
55 | "name": "python",
56 | "nbconvert_exporter": "python",
57 | "pygments_lexer": "ipython3",
58 | "version": "3.7.3"
59 | }
60 | },
61 | "nbformat": 4,
62 | "nbformat_minor": 2
63 | }
64 |
--------------------------------------------------------------------------------
/mann_whitney_u_test_Python.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 1,
6 | "id": "forced-access",
7 | "metadata": {},
8 | "outputs": [
9 | {
10 | "data": {
11 | "text/html": [
12 | "\n",
13 | "\n",
26 | "
\n",
27 | " \n",
28 | " \n",
29 | " | \n",
30 | " X | \n",
31 | " Y | \n",
32 | "
\n",
33 | " \n",
34 | " \n",
35 | " \n",
36 | " 0 | \n",
37 | " 0.796469 | \n",
38 | " 0.831551 | \n",
39 | "
\n",
40 | " \n",
41 | " 1 | \n",
42 | " 0.386139 | \n",
43 | " 0.831828 | \n",
44 | "
\n",
45 | " \n",
46 | " 2 | \n",
47 | " 0.326851 | \n",
48 | " 0.934401 | \n",
49 | "
\n",
50 | " \n",
51 | " 3 | \n",
52 | " 0.651315 | \n",
53 | " 1.149432 | \n",
54 | "
\n",
55 | " \n",
56 | " 4 | \n",
57 | " 0.819469 | \n",
58 | " 1.024455 | \n",
59 | "
\n",
60 | " \n",
61 | "
\n",
62 | "
"
63 | ],
64 | "text/plain": [
65 | " X Y\n",
66 | "0 0.796469 0.831551\n",
67 | "1 0.386139 0.831828\n",
68 | "2 0.326851 0.934401\n",
69 | "3 0.651315 1.149432\n",
70 | "4 0.819469 1.024455"
71 | ]
72 | },
73 | "execution_count": 1,
74 | "metadata": {},
75 | "output_type": "execute_result"
76 | }
77 | ],
78 | "source": [
79 | "import pandas as pd\n",
80 | "\n",
81 | "df = pd.read_csv('./SimData/mannwu.csv')\n",
82 | "\n",
83 | "df.head()"
84 | ]
85 | },
86 | {
87 | "cell_type": "code",
88 | "execution_count": 3,
89 | "id": "surprised-eclipse",
90 | "metadata": {},
91 | "outputs": [
92 | {
93 | "data": {
94 | "text/plain": [
95 | "MannwhitneyuResult(statistic=81.0, pvalue=0.005434115153576264)"
96 | ]
97 | },
98 | "execution_count": 3,
99 | "metadata": {},
100 | "output_type": "execute_result"
101 | }
102 | ],
103 | "source": [
104 | "from scipy.stats import mannwhitneyu\n",
105 | "\n",
106 | "mannwhitneyu(df['X'], df['Y'])"
107 | ]
108 | },
109 | {
110 | "cell_type": "code",
111 | "execution_count": 5,
112 | "id": "civil-price",
113 | "metadata": {},
114 | "outputs": [
115 | {
116 | "data": {
117 | "text/html": [
118 | "\n",
119 | "\n",
132 | "
\n",
133 | " \n",
134 | " \n",
135 | " | \n",
136 | " U-val | \n",
137 | " tail | \n",
138 | " p-val | \n",
139 | " RBC | \n",
140 | " CLES | \n",
141 | "
\n",
142 | " \n",
143 | " \n",
144 | " \n",
145 | " MWU | \n",
146 | " 81.0 | \n",
147 | " less | \n",
148 | " 0.005434 | \n",
149 | " 0.5 | \n",
150 | " 0.75 | \n",
151 | "
\n",
152 | " \n",
153 | "
\n",
154 | "
"
155 | ],
156 | "text/plain": [
157 | " U-val tail p-val RBC CLES\n",
158 | "MWU 81.0 less 0.005434 0.5 0.75"
159 | ]
160 | },
161 | "execution_count": 5,
162 | "metadata": {},
163 | "output_type": "execute_result"
164 | }
165 | ],
166 | "source": [
167 | "from pingouin import mwu\n",
168 | "\n",
169 | "mwu(df['X'], df['Y'], tail='one-sided')"
170 | ]
171 | },
172 | {
173 | "cell_type": "code",
174 | "execution_count": null,
175 | "id": "patient-conviction",
176 | "metadata": {},
177 | "outputs": [],
178 | "source": []
179 | }
180 | ],
181 | "metadata": {
182 | "kernelspec": {
183 | "display_name": "Python 3",
184 | "language": "python",
185 | "name": "python3"
186 | },
187 | "language_info": {
188 | "codemirror_mode": {
189 | "name": "ipython",
190 | "version": 3
191 | },
192 | "file_extension": ".py",
193 | "mimetype": "text/x-python",
194 | "name": "python",
195 | "nbconvert_exporter": "python",
196 | "pygments_lexer": "ipython3",
197 | "version": "3.9.1"
198 | }
199 | },
200 | "nbformat": 4,
201 | "nbformat_minor": 5
202 | }
203 |
--------------------------------------------------------------------------------
/multiple_Sheets.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/multiple_Sheets.xlsx
--------------------------------------------------------------------------------
/names_ages.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/names_ages.xlsx
--------------------------------------------------------------------------------
/newfilename.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marsja/jupyter/76864b3554371de9eced965f46a06e43726d9863/newfilename.xlsx
--------------------------------------------------------------------------------
/python_descriptive_statistics_sample.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 3,
6 | "metadata": {},
7 | "outputs": [
8 | {
9 | "data": {
10 | "text/html": [
11 | "\n",
12 | "\n",
25 | "
\n",
26 | " \n",
27 | " \n",
28 | " | \n",
29 | " ID | \n",
30 | " Name | \n",
31 | " Day | \n",
32 | " Age | \n",
33 | " Response | \n",
34 | " Gender | \n",
35 | "
\n",
36 | " \n",
37 | " \n",
38 | " \n",
39 | " 0 | \n",
40 | " 1 | \n",
41 | " John | \n",
42 | " Fifth | \n",
43 | " 23 | \n",
44 | " 0.453733 | \n",
45 | " 0 | \n",
46 | "
\n",
47 | " \n",
48 | " 1 | \n",
49 | " 2 | \n",
50 | " Billie | \n",
51 | " Fifth | \n",
52 | " 22 | \n",
53 | " 0.257360 | \n",
54 | " 0 | \n",
55 | "
\n",
56 | " \n",
57 | " 2 | \n",
58 | " 3 | \n",
59 | " Robert | \n",
60 | " Fifth | \n",
61 | " 20 | \n",
62 | " 0.443393 | \n",
63 | " 0 | \n",
64 | "
\n",
65 | " \n",
66 | " 3 | \n",
67 | " 4 | \n",
68 | " Don | \n",
69 | " Fifth | \n",
70 | " 27 | \n",
71 | " 0.423592 | \n",
72 | " 0 | \n",
73 | "
\n",
74 | " \n",
75 | " 4 | \n",
76 | " 5 | \n",
77 | " Joseph | \n",
78 | " Fifth | \n",
79 | " 21 | \n",
80 | " 0.571355 | \n",
81 | " 0 | \n",
82 | "
\n",
83 | " \n",
84 | "
\n",
85 | "
"
86 | ],
87 | "text/plain": [
88 | " ID Name Day Age Response Gender\n",
89 | "0 1 John Fifth 23 0.453733 0\n",
90 | "1 2 Billie Fifth 22 0.257360 0\n",
91 | "2 3 Robert Fifth 20 0.443393 0\n",
92 | "3 4 Don Fifth 27 0.423592 0\n",
93 | "4 5 Joseph Fifth 21 0.571355 0"
94 | ]
95 | },
96 | "execution_count": 3,
97 | "metadata": {},
98 | "output_type": "execute_result"
99 | }
100 | ],
101 | "source": [
102 | "import pandas as pd\n",
103 | "\n",
104 | "data = 'https://raw.githubusercontent.com/marsja/jupyter/master/SimData/FifthDayData.csv'\n",
105 | "\n",
106 | "df = pd.read_csv(data)\n",
107 | "\n",
108 | "df.head()"
109 | ]
110 | },
111 | {
112 | "cell_type": "code",
113 | "execution_count": 9,
114 | "metadata": {},
115 | "outputs": [
116 | {
117 | "data": {
118 | "text/plain": [
119 | "Male 0\n",
120 | "1 0\n",
121 | "2 0\n",
122 | "3 0\n",
123 | "4 0\n",
124 | " ..\n",
125 | "195 1\n",
126 | "196 1\n",
127 | "197 1\n",
128 | "198 1\n",
129 | "199 1\n",
130 | "Name: Gender, Length: 200, dtype: int64"
131 | ]
132 | },
133 | "execution_count": 9,
134 | "metadata": {},
135 | "output_type": "execute_result"
136 | }
137 | ],
138 | "source": [
139 | "df.Gender.rename({0:'Male'})"
140 | ]
141 | },
142 | {
143 | "cell_type": "code",
144 | "execution_count": null,
145 | "metadata": {},
146 | "outputs": [],
147 | "source": []
148 | }
149 | ],
150 | "metadata": {
151 | "kernelspec": {
152 | "display_name": "Python 3",
153 | "language": "python",
154 | "name": "python3"
155 | },
156 | "language_info": {
157 | "codemirror_mode": {
158 | "name": "ipython",
159 | "version": 3
160 | },
161 | "file_extension": ".py",
162 | "mimetype": "text/x-python",
163 | "name": "python",
164 | "nbconvert_exporter": "python",
165 | "pygments_lexer": "ipython3",
166 | "version": "3.7.3"
167 | }
168 | },
169 | "nbformat": 4,
170 | "nbformat_minor": 2
171 | }
172 |
--------------------------------------------------------------------------------
/rpy2 tutorial example code.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "## Rpy2 Tutorial: Code Example\n",
8 | "This code example is for the rpy2 tutorials on [my blog](https://www.marsja.se/r-from-python-rpy2-tutorial/) and my [YouTube Channel](https://youtu.be/GvmoOHkABNA).\n",
9 | "\n",
10 | "If you want another code example on how to call R from Python you can find it [here](https://youtu.be/RK-n78ZOXUg) in the YouTube tutorial."
11 | ]
12 | },
13 | {
14 | "cell_type": "code",
15 | "execution_count": 2,
16 | "metadata": {},
17 | "outputs": [],
18 | "source": [
19 | "import rpy2.robjects as robjects\n",
20 | "import rpy2.robjects.packages as rpackages\n",
21 | "from rpy2.robjects.vectors import StrVector\n",
22 | "\n",
23 | "packageNames = ('afex', 'emmeans')\n",
24 | "utils = rpackages.importr('utils')\n",
25 | "utils.chooseCRANmirror(ind=1)\n",
26 | "\n",
27 | "packnames_to_install = [x for x in packageNames if not rpackages.isinstalled(x)]\n",
28 | "\n",
29 | "if len(packnames_to_install) > 0:\n",
30 | " utils.install_packages(StrVector(packnames_to_install))"
31 | ]
32 | },
33 | {
34 | "cell_type": "code",
35 | "execution_count": 3,
36 | "metadata": {},
37 | "outputs": [
38 | {
39 | "data": {
40 | "text/html": [
41 | "\n",
42 | " R/rpy2 DataFrame (6 x 4)\n",
43 | " \n",
44 | " \n",
45 | " \n",
46 | " \n",
47 | " Observation | \n",
48 | " \n",
49 | " Subject | \n",
50 | " \n",
51 | " Valence | \n",
52 | " \n",
53 | " Recall | \n",
54 | " \n",
55 | "
\n",
56 | " \n",
57 | " \n",
58 | " \n",
59 | " \n",
60 | " \n",
61 | " \n",
62 | " 1\n",
63 | " | \n",
64 | " \n",
65 | " \n",
66 | " Jim\n",
67 | " | \n",
68 | " \n",
69 | " \n",
70 | " Neg\n",
71 | " | \n",
72 | " \n",
73 | " \n",
74 | " 32\n",
75 | " | \n",
76 | " \n",
77 | "
\n",
78 | " \n",
79 | " \n",
80 | " \n",
81 | " \n",
82 | " 2\n",
83 | " | \n",
84 | " \n",
85 | " \n",
86 | " Jim\n",
87 | " | \n",
88 | " \n",
89 | " \n",
90 | " Neu\n",
91 | " | \n",
92 | " \n",
93 | " \n",
94 | " 15\n",
95 | " | \n",
96 | " \n",
97 | "
\n",
98 | " \n",
99 | " \n",
100 | " \n",
101 | " \n",
102 | " 3\n",
103 | " | \n",
104 | " \n",
105 | " \n",
106 | " Jim\n",
107 | " | \n",
108 | " \n",
109 | " \n",
110 | " Pos\n",
111 | " | \n",
112 | " \n",
113 | " \n",
114 | " 45\n",
115 | " | \n",
116 | " \n",
117 | "
\n",
118 | " \n",
119 | " \n",
120 | " \n",
121 | " \n",
122 | " 4\n",
123 | " | \n",
124 | " \n",
125 | " \n",
126 | " Victor\n",
127 | " | \n",
128 | " \n",
129 | " \n",
130 | " Neg\n",
131 | " | \n",
132 | " \n",
133 | " \n",
134 | " 30\n",
135 | " | \n",
136 | " \n",
137 | "
\n",
138 | " \n",
139 | " \n",
140 | " \n",
141 | " \n",
142 | " 5\n",
143 | " | \n",
144 | " \n",
145 | " \n",
146 | " Victor\n",
147 | " | \n",
148 | " \n",
149 | " \n",
150 | " Neu\n",
151 | " | \n",
152 | " \n",
153 | " \n",
154 | " 13\n",
155 | " | \n",
156 | " \n",
157 | "
\n",
158 | " \n",
159 | " \n",
160 | " \n",
161 | " \n",
162 | " 6\n",
163 | " | \n",
164 | " \n",
165 | " \n",
166 | " Victor\n",
167 | " | \n",
168 | " \n",
169 | " \n",
170 | " Pos\n",
171 | " | \n",
172 | " \n",
173 | " \n",
174 | " 40\n",
175 | " | \n",
176 | " \n",
177 | "
\n",
178 | " \n",
179 | " \n",
180 | "
\n",
181 | " "
182 | ],
183 | "text/plain": [
184 | "R object with classes: ('data.frame',) mapped to:\n",
185 | "\n",
186 | "[IntVector, FactorVector, FactorVector, IntVector]\n",
187 | " Observation: \n",
188 | " R object with classes: ('integer',) mapped to:\n",
189 | "\n",
190 | "[1, 2, 3, 4, 5, 6]\n",
191 | " Subject: \n",
192 | " R object with classes: ('factor',) mapped to:\n",
193 | "\n",
194 | "[Jim, Jim, Jim, Victor, Victor, Victor]\n",
195 | " Valence: \n",
196 | " R object with classes: ('factor',) mapped to:\n",
197 | "\n",
198 | "[Neg, Neu, Pos, Neg, Neu, Pos]\n",
199 | " Recall: \n",
200 | " R object with classes: ('integer',) mapped to:\n",
201 | "\n",
202 | "[32, 15, 45, 30, 13, 40]"
203 | ]
204 | },
205 | "execution_count": 3,
206 | "metadata": {},
207 | "output_type": "execute_result"
208 | }
209 | ],
210 | "source": [
211 | "data = robjects.r('read.table(file =' \\\n",
212 | " '\"http://personality-project.org/r/datasets/R.appendix3.data\", header = T)')\n",
213 | "\n",
214 | "data.head()"
215 | ]
216 | },
217 | {
218 | "cell_type": "code",
219 | "execution_count": null,
220 | "metadata": {},
221 | "outputs": [],
222 | "source": [
223 | "afex = rpackages.importr('afex') \n",
224 | "model = afex.aov_ez('Subject', 'Recall', data, within='Valence')\n",
225 | "print(model)"
226 | ]
227 | },
228 | {
229 | "cell_type": "code",
230 | "execution_count": 4,
231 | "metadata": {},
232 | "outputs": [
233 | {
234 | "name": "stdout",
235 | "output_type": "stream",
236 | "text": [
237 | "$emmeans\n",
238 | "\r\n",
239 | " Valence emmean SE df lower.CL upper.CL\n",
240 | "\r\n",
241 | " Neg 27.8 1.570563 7.33 24.119388 31.48061\n",
242 | "\r\n",
243 | " Neu 11.6 1.570563 7.33 7.919388 15.28061\n",
244 | "\r\n",
245 | " Pos 40.0 1.570563 7.33 36.319388 43.68061\n",
246 | "\r\n",
247 | "\n",
248 | "\r\n",
249 | "Confidence level used: 0.95 \n",
250 | "\r\n",
251 | "\n",
252 | "\r\n",
253 | "$contrasts\n",
254 | "\r\n",
255 | " contrast estimate SE df t.ratio p.value\n",
256 | "\r\n",
257 | " Neg - Neu 16.2 1.465151 8 11.057 <.0001\n",
258 | "\r\n",
259 | " Neg - Pos -12.2 1.465151 8 -8.327 <.0001\n",
260 | "\r\n",
261 | " Neu - Pos -28.4 1.465151 8 -19.384 <.0001\n",
262 | "\r\n",
263 | "\n",
264 | "\r\n",
265 | "P value adjustment: holm method for 3 tests \n",
266 | "\r\n",
267 | "\n",
268 | "\n"
269 | ]
270 | }
271 | ],
272 | "source": [
273 | "emmeans = rpackages.importr('emmeans', \n",
274 | " robject_translations = {\"recover.data.call\": \"recover_data_call1\"})\n",
275 | "pairwise = emmeans.emmeans(model, \"Valence\", contr=\"pairwise\", adjust=\"holm\")\n",
276 | "\n",
277 | "print(pairwise)"
278 | ]
279 | },
280 | {
281 | "cell_type": "code",
282 | "execution_count": null,
283 | "metadata": {},
284 | "outputs": [],
285 | "source": []
286 | }
287 | ],
288 | "metadata": {
289 | "kernelspec": {
290 | "display_name": "Python 3",
291 | "language": "python",
292 | "name": "python3"
293 | },
294 | "language_info": {
295 | "codemirror_mode": {
296 | "name": "ipython",
297 | "version": 3
298 | },
299 | "file_extension": ".py",
300 | "mimetype": "text/x-python",
301 | "name": "python",
302 | "nbconvert_exporter": "python",
303 | "pygments_lexer": "ipython3",
304 | "version": "3.7.3"
305 | }
306 | },
307 | "nbformat": 4,
308 | "nbformat_minor": 2
309 | }
310 |
--------------------------------------------------------------------------------