Skip to content
Snippets Groups Projects
plots_fig1.ipynb 432 KiB
Newer Older
  • Learn to ignore specific revisions
  •    }
      },
      {
       "cell_type": "code",
    
    Felix Reichel's avatar
    Felix Reichel committed
       "execution_count": 21,
    
       "outputs": [],
       "source": [
    
        "save_name = \"fig1I_WBC_myelo_baseline_emod\"\n",
        "savepath = os.path.join(savefolder, save_name)\n",
    
        "fig.tight_layout()\n",
        "fig.savefig(savepath+\".pdf\", dpi=900, format='pdf')"
       ],
       "metadata": {
        "collapsed": false,
        "pycharm": {
         "name": "#%%\n"
        }
       }
      },
      {
       "cell_type": "code",
    
       "execution_count": 23,
       "outputs": [
        {
         "name": "stdout",
         "output_type": "stream",
         "text": [
    
    Felix Reichel's avatar
    Felix Reichel committed
          "p-Value (Likelihood Ratio Test): 0.00706240810654952\n",
          "Estimate: 0.723401625492519\n",
          "Std. Error (Estimate): 0.258049356018904\n",
          "Fixed Effect: 0.146437880098183\n",
          "Std. Error (Fixed Effect) 0.258412927980769\n"
    
       "source": [
        "para = 'emodulus'\n",
        "\n",
        "Result = linmixmod(xs=df_myelo[para], treatment=df_myelo['treatment'],\n",
    
    Felix Reichel's avatar
    Felix Reichel committed
        "                   #df_myelo['repeat'] begins at 0, but 0 values are excluded from the computation\n",
    
        "                   timeunit=df_myelo['repeat']+1, model='lmm')\n",
        "\n",
        "print(\"p-Value (Likelihood Ratio Test):\", Result[\"p-Value (Likelihood Ratio Test)\"])\n",
        "print(\"Estimate:\", Result[\"Estimate\"])\n",
        "print(\"Std. Error (Estimate):\", Result[\"Std. Error (Estimate)\"])\n",
        "print(\"Fixed Effect:\", Result[\"Fixed Effect\"])\n",
        "print(\"Std. Error (Fixed Effect)\", Result[\"Std. Error (Fixed Effect)\"])"
       ],
       "metadata": {
        "collapsed": false,
        "pycharm": {
         "name": "#%%\n"
        }
       }
    
      },
      {
       "cell_type": "markdown",
       "source": [
        "```\n",
        "p-Value (Likelihood Ratio Test): 0.00706240810655399\n",
        "Estimate: 0.723401625519808\n",
        "Std. Error (Estimate): 0.258067695307158\n",
        "Fixed Effect: 0.146437923010934\n",
        "Std. Error (Fixed Effect) 0.258431194852495\n",
        "```"
       ],
       "metadata": {
        "collapsed": false,
        "pycharm": {
         "name": "#%% md\n"
        }
       }
      },
      {
       "cell_type": "code",
    
       "execution_count": 23,
    
       "outputs": [],
       "source": [],
       "metadata": {
        "collapsed": false,
        "pycharm": {
         "name": "#%%\n"
        }
       }
    
      }
     ],
     "metadata": {
      "kernelspec": {
       "display_name": "Python 3",
       "language": "python",
       "name": "python3"
      },
      "language_info": {
       "codemirror_mode": {
        "name": "ipython",
        "version": 2
       },
       "file_extension": ".py",
       "mimetype": "text/x-python",
       "name": "python",
       "nbconvert_exporter": "python",
       "pygments_lexer": "ipython2",
       "version": "2.7.6"
      }
     },
     "nbformat": 4,
     "nbformat_minor": 0
    }