<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR</title><revhistory><revision><revnumber>12</revnumber><date>2015-06-07 16:29:31</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision><revision><revnumber>11</revnumber><date>2015-06-07 16:27:02</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision><revision><revnumber>10</revnumber><date>2015-06-02 08:35:29</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision><revision><revnumber>9</revnumber><date>2015-06-02 08:21:00</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision><revision><revnumber>8</revnumber><date>2015-06-02 08:18:29</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision><revision><revnumber>7</revnumber><date>2015-06-02 08:17:31</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision><revision><revnumber>6</revnumber><date>2015-06-02 08:17:04</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision><revision><revnumber>5</revnumber><date>2015-06-02 08:09:42</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision><revision><revnumber>4</revnumber><date>2015-06-02 08:07:00</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision><revision><revnumber>3</revnumber><date>2015-06-02 06:58:41</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision><revision><revnumber>2</revnumber><date>2015-06-02 06:57:11</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision><revision><revnumber>1</revnumber><date>2015-06-02 05:45:09</date><authorinitials>mandy.vogel@googlemail.com</authorinitials></revision></revhistory></articleinfo><section><title>About Deducer</title><section><title>Why Deducer?</title><para>Deducer is designed to be a free easy-to-use alternative to proprietary data analysis software such as SPSS, JMP, and Minitab. It has a menu system to perform common data manipulation and analysis tasks, and an excel-like spreadsheet in which to view and edit data frames. The goal of the project is two fold. </para><itemizedlist><listitem><para>Provide an intuitive graphical user interface (GUI) for R, encouraging non-technical users to learn and perform analyses without programming getting in their way. So it may lower the entry threshold. </para></listitem><listitem><para>Increase the efficiency of expert R users when performing common tasks by replacing hundreds of keystrokes with a few mouse clicks. Also, as much as possible the GUI should not get in their way if they just want to do some programming.  </para></listitem></itemizedlist></section><section><title>Why Not?</title><itemizedlist><listitem><para>Deducer is java-dependend and therefore sometimes not stable (although it has been a long time since I had problems, but I work very rarely with the deducer package; maybe it is more stable these days) </para></listitem><listitem><para>R is designed for text based interactions, the full functionality is not available through menus </para></listitem><listitem><para>the course will be based on typing the commands but maybe the Deducer GUI helps to overcome your inhibition to use R </para></listitem></itemizedlist></section><section><title>Installation</title><itemizedlist><listitem><para>there are instructions how to install at <ulink url="http://www.deducer.org/"/> </para><itemizedlist><listitem><para>Windows: the all-in-one installer for windows will install an outdated R version, so please install first a recent R version from <ulink url="http://cran.r-project.org/bin/windows/base/">CRAN Windows</ulink> </para></listitem><listitem><para>install the java development toolkit from here: <ulink url="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"/>  </para></listitem><listitem><para>start R and run  </para></listitem></itemizedlist></listitem></itemizedlist><programlisting format="linespecific" language="highlight" linenumbering="numbered" startinglinenumber="1"><methodname><![CDATA[install.packages]]></methodname><![CDATA[(]]><methodname><![CDATA[c]]></methodname><![CDATA[(]]><phrase><![CDATA["]]></phrase><phrase><![CDATA[Deducer"]]></phrase><![CDATA[,]]><phrase><![CDATA["]]></phrase><phrase><![CDATA[DeducerExtras"]]></phrase><![CDATA[))]]>
</programlisting><itemizedlist><listitem><para>start Deducer from within R: </para><itemizedlist><listitem><para>run R </para></listitem><listitem><para>type: library(JGR) </para></listitem><listitem><para>followed by: JGR() </para></listitem></itemizedlist></listitem><listitem><para>there is also a script created during the installation; the path is shown when you start Deducer via R (e.g. \texttt{~/R/i686-pc-linux-gnu-library/2.14/JGR/scripts/run} </para></listitem></itemizedlist></section><section><title>Prepare</title><itemizedlist><listitem><para>After you have installed deducer, you have to load the Deducer related packages (this extends the menus) </para><itemizedlist><listitem><para>go to the <emphasis>packages &amp; data</emphasis> menu in the menu bar </para></listitem></itemizedlist></listitem></itemizedlist><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=menupack1.png" width="800 height=600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para><itemizedlist><listitem><para>choose <emphasis>Package Manager</emphasis> </para></listitem></itemizedlist><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=menupack2.png" width="800 height=600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para><itemizedlist><listitem><para>the package manager opens up: </para><itemizedlist><listitem><para>by marking the checkboxes in the first column you can load packages (<emphasis>loaded</emphasis>) </para></listitem><listitem><para>by marking the ckeckboxes in the second column you can choose which packages you want to be automatically loaded every time you start Deducer (<emphasis>default</emphasis>) </para></listitem><listitem><para>the third and fourth columns show the name and a short description of the packages respectively </para></listitem></itemizedlist></listitem><listitem><para>scroll down to the <emphasis>Deducer</emphasis> and the <emphasis><ulink url="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR/IT4Science/DeducerExtra#">DeducerExtra</ulink></emphasis> packages and mark for each of them both: the loaded and the default checkbox </para></listitem></itemizedlist><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=packman1.png" width="800 height=600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para><itemizedlist><listitem><para>close the package manager by clicking on the <emphasis>Close</emphasis> button </para></listitem></itemizedlist><itemizedlist><listitem><para>Now basic statistical procedures are available through the menus (and from now on in every session) </para></listitem></itemizedlist></section><section><title>First Steps</title><itemizedlist><listitem><para>now we will test some functionalities </para></listitem><listitem><para>so first we load an examples data set: </para><itemizedlist><listitem><para>go to the <emphasis>Extras</emphasis> menu in the menu bar and choose <emphasis>Load data from package</emphasis> </para></listitem></itemizedlist></listitem></itemizedlist><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=choosedata1.png" width="800 height=600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para><itemizedlist><listitem><para>a little window opens up and you can choose a data set </para></listitem><listitem><para>for now choose the <emphasis>Pima.te</emphasis> data set and click the <emphasis>Run</emphasis> button </para></listitem></itemizedlist><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=choosedata2.png" width="200"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para></section><section><title>Open the Data Viewer</title><para>The data viewer provides an easy to use, spreadsheet-like environment to view and edit data. Copy and pasting is supported, and is compatible with Excel 2003/2007, so data can be moved from Excel to R by simply copying it to the data viewer. Contextual menus are used to insert, delete and copy rows and columns. </para><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=dataviewer1.png" width="600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para></section><section><title>The Data Viewer - Data View</title><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=dataviewer2.png" width="600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para><itemizedlist><listitem><para>a right click on the row or column headers  </para><itemizedlist><listitem><para>allows one to insert, copy and delete columns and rows \note{Add column sex} </para></listitem><listitem><para>sort by one column </para></listitem></itemizedlist></listitem><listitem><para>you can also edit the data </para></listitem><listitem><para>in the drop down menu Data Set you can choose the data frame </para></listitem></itemizedlist><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=dataviewer4.png" width="600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para></section><section><title>The Data Viewer - Variable View</title><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=dataviewer3.png" width="600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para><para>In the variable view  The variable column represents the variable name. The type column determines the storage type.   </para><itemizedlist><listitem><para>the properties of each variable in the data frame can be edited </para></listitem><listitem><para>the type column determines the storage type; variables can be stored as  </para><itemizedlist><listitem><para>Strings (character) </para></listitem><listitem><para>Doubles (Numeric) </para></listitem><listitem><para>Integers </para></listitem><listitem><para>Logicals (yes/no) or  </para></listitem><listitem><para>Factors </para></listitem></itemizedlist></listitem><listitem><para>The levels of Factors are displayed in the 'Factor Levels' column, and can be edited by clicking on the appropriate cell, which brings up the Factor Editor </para></listitem></itemizedlist><para>The levels of Factors are displayed in the 'Factor Levels' column, and can be edited by clicking on the appropriate cell, which brings up the Factor Editor.  </para><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=dataviewer5.png" width="600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para><section><title>Exercise</title><orderedlist numeration="arabic"><listitem><para>Find and load the MASS package (via the <emphasis>Packages &amp; Data</emphasis> menu). </para></listitem><listitem><para>Load the Pima.te data (if you haven't done it already) </para></listitem></orderedlist></section></section><section><title>Some Basic Descriptives</title><section><title>Tables</title><itemizedlist><listitem><para>now go to the  <emphasis>Analysis</emphasis> menu from the menu bar and choose <emphasis>Frequencies</emphasis> </para></listitem><listitem><para>a little window will show up, make sure that in the upper left corner you have chosen the <emphasis>Pima.te</emphasis> data set </para></listitem></itemizedlist><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=frequded1.png" width="600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para><itemizedlist><listitem><para>the left half of the window shows all available variables </para></listitem><listitem><para>choose <emphasis>npreg</emphasis> (number of pregnancies) and <emphasis>type</emphasis> and transfer them to the righthandside </para></listitem><listitem><para>now click the <emphasis>ok</emphasis> button </para></listitem><listitem><para>what we get is a table containing the absolute frequencies, the relative frequencies and the cumulative frequencies  </para></listitem></itemizedlist></section><section><title>Numeric Summaries</title><itemizedlist><listitem><para>now go to the  <emphasis>Analysis</emphasis> menu from the menu bar and choose <emphasis>Descriptives</emphasis> </para></listitem><listitem><para>again a little window will show up, make sure that in the upper left corner you have chosen the <emphasis>Pima.te</emphasis> data set </para></listitem></itemizedlist><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=descded1.png" width="600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para><itemizedlist><listitem><para>the left half of the window shows all available variables </para></listitem><listitem><para>choose <emphasis>bmi</emphasis>  </para></listitem></itemizedlist><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=descded2.png" width="600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para><itemizedlist><listitem><para>now click the <emphasis>ok</emphasis> button </para></listitem><listitem><para>now we get a window where you can choose the summary statistics you are interested in </para></listitem><listitem><para>you may choose the mean, the standard deviation, and the number of valid n </para></listitem></itemizedlist><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=descded3.png" width="600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para><itemizedlist><listitem><para>press the run button and you get the results </para></listitem></itemizedlist></section><section><title>Exercises</title><orderedlist numeration="arabic"><listitem><para>use the steps above to get the mean, median, the 25th percentile and the 75th percentile of the bmi variable </para></listitem><listitem><para>do the same again but now use the <emphasis>Strata</emphasis> box in the second (with variable <emphasis>type</emphasis>). Is there a difference regarding to those summary statistics between the groups? </para></listitem></orderedlist><para><inlinemediaobject><imageobject><imagedata fileref="https://wiki.init.mpg.de/IT4Science/RstatisTik/RstatisTikPortal/RcourSe/CourseOutline/DeducerR?action=AttachFile&amp;do=get&amp;target=descded4.png" width="600"/></imageobject><textobject><phrase>alt text</phrase></textobject></inlinemediaobject> </para></section></section><section><title>Exercises for RStudio Users</title><itemizedlist><listitem><para>instead to do the steps via the menus, now we use the keyboard </para></listitem><listitem><para>so load the MASS package by typing  </para></listitem></itemizedlist><programlisting format="linespecific" language="highlight" linenumbering="numbered" startinglinenumber="1"><methodname><![CDATA[library]]></methodname><![CDATA[(]]><methodname><![CDATA[MASS]]></methodname><![CDATA[)]]>
</programlisting><orderedlist><listitem><para>load the <emphasis>Pima.te</emphasis> data by typing </para></listitem></orderedlist><programlisting format="linespecific" language="highlight" linenumbering="numbered" startinglinenumber="1"><methodname><![CDATA[data]]></methodname><![CDATA[(]]><methodname><![CDATA[Pima.te]]></methodname><![CDATA[)]]>
</programlisting><orderedlist><listitem><para>get information about the frequencies of npreg type </para></listitem></orderedlist><programlisting format="linespecific" language="highlight" linenumbering="numbered" startinglinenumber="1"><methodname><![CDATA[table]]></methodname><![CDATA[(]]><methodname><![CDATA[Pima.te]]></methodname><![CDATA[$]]><methodname><![CDATA[npreg]]></methodname><![CDATA[) ]]>
</programlisting><programlisting format="linespecific" language="highlight" linenumbering="numbered" startinglinenumber="1"><methodname><![CDATA[prop.table]]></methodname><![CDATA[(]]><methodname><![CDATA[table]]></methodname><![CDATA[(]]><methodname><![CDATA[Pima.te]]></methodname><![CDATA[$]]><methodname><![CDATA[npreg]]></methodname><![CDATA[))]]>
</programlisting><orderedlist><listitem><para>do the same with the type variable </para></listitem><listitem><para>use the summary command to get basic information about the distribution of the the bmi variable </para></listitem></orderedlist><programlisting format="linespecific" language="highlight" linenumbering="numbered" startinglinenumber="1"><methodname><![CDATA[summary]]></methodname><![CDATA[(]]><methodname><![CDATA[Pima.te]]></methodname><![CDATA[$]]><methodname><![CDATA[bmi]]></methodname><![CDATA[)]]>
</programlisting></section></section></article>