<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tristan Boudreault on Medium]]></title>
        <description><![CDATA[Stories by Tristan Boudreault on Medium]]></description>
        <link>https://medium.com/@TristanB?source=rss-37b9a43bb674------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*kf_dp0mDJgKSwwVT.jpg</url>
            <title>Stories by Tristan Boudreault on Medium</title>
            <link>https://medium.com/@TristanB?source=rss-37b9a43bb674------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 18:08:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@TristanB/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Machine Learning for Data Analysis Week 4]]></title>
            <link>https://medium.com/@TristanB/machine-learning-for-data-analysis-week-3-c8cfbeea85c4?source=rss-37b9a43bb674------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8cfbeea85c4</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[psychology]]></category>
            <dc:creator><![CDATA[Tristan Boudreault]]></dc:creator>
            <pubDate>Mon, 29 Feb 2016 02:36:11 GMT</pubDate>
            <atom:updated>2016-02-29T02:42:48.222Z</atom:updated>
            <content:encoded><![CDATA[<h4>Context</h4><p>Note: You can find the python code for this analysis <a href="https://dl.dropboxusercontent.com/u/371603/Temp/k-mean%20clusters.html">here</a></p><p>The general consensus in academic psychology is that there are five fundamental personality traits from which derives an individual personality. They are: <strong>Extroversion</strong>, <strong>Conscientiousness</strong>, <strong>Neuroticism</strong>, <strong>Agreeableness</strong>,<strong>Openness</strong>. You can read more on the traits and the data used <a href="https://medium.com/@TristanB/regression-modeling-week-1-4122a63fbed3#.m4e62a52x">here</a>. They have been used as well as age and gender (0=female, 1=male) in the analysis below. The data at the basis of this work comes from an online personality test filled by 2613 respondants.</p><p>The initial idea of this project is trying to establish links between personality traits and <strong>Grit</strong>. Hopefully our clusters will prove useful for that. <strong>Grit </strong>is the tendency to sustain interest in and effort toward very long-term goals. Research has established the predictive power of <strong>Grit</strong> over and beyond measures of talent, for objectively measured success outcomes. For instance, in prospective longitudinal studies, <strong>Grit </strong>predicts surviving the arduous first summer of training at West Point and reaching the final rounds of the National Spelling Bee, retention in the U.S. Special Forces, retention and performance among novice teachers and sales agents, and graduation from Chicago public high schools.</p><h4>K-means clustering</h4><p>A k-means cluster analysis was conducted to identify underlying subgroups of respondants based on their similarity on 7 variables (the 5 fundamental personality traits as well as age and gender) that could have an impact on Grit. All clustering variables were standardized to have a mean of 0 and a standard deviation of 1.</p><p><strong>Elbow Method</strong><br>Data were randomly split into a training set that included 70% of the observations (N=1840) and a test set that included 30% of the observations (N=789). A series of k-means cluster analyses were conducted on the training data specifying k=1–9 clusters, using Euclidean distance. The variance in the clustering variables that was accounted for by the clusters (r-square) was plotted for each of the nine cluster solutions in an elbow curve to provide guidance for choosing the number of clusters to interpret.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*YekYQ8_vRlhzBiqkCsVX9w.png" /><figcaption>Figure 1. Elbow curve of r-square values for the nine cluster solutions</figcaption></figure><p>The elbow curve timidly suggests that the 3-clusters solutions might be interpreted.</p><p><strong>Canonical discriminant analysis</strong><br>Canonical discriminant analysis was used to reduce the 7 clustering variable down a few variables that accounted for most of the variance in the clustering variables. A scatterplot of the first two canonical variables by cluster (Figure 2 shown below) indicated that the observations in clusters 0 and 2 were densely packed with relatively low within cluster variance, and did not overlap very much with the other clusters. Cluster 1 was generally distinct, but the observations had greater spread suggesting higher within cluster variance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*vxxWk_EBILJ3i6TG3Mq2KA.png" /><figcaption>Figure 2. Plot of the first two canonical variables for the clustering variables by cluster.</figcaption></figure><p><strong>Cluster interpretation</strong><br>The means on the clustering variables is presented in fig. 3 below.</p><p><em>Cluster 0</em><br>Compared to the other clusters, cluster 0 respondants score stronger on the 5 fundamental personality traits. They are also more likely to be males and are older than the other clusters.</p><p><em>Cluster 1</em><br>People in cluster 1 had moderate scores on the personality variables with the exception of neuroticism that ranked the highest among the 3 clusters. The respondants are also mostly females as indicated by the low gender mean.</p><p><em>Cluster 2</em><br>Cluster 2 had lowest scores on the clustering variables. This cluster or mainly a male cluster with a lower age and a less pronounced personality as indicated by low scores in all personality traits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*FGnb3_3eh7kxqT5stY_Tqw.png" /><figcaption>Fig 3. Means of clustering variables</figcaption></figure><p><strong>Analysis of variance</strong><br>In order to externally validate the clusters (that is valiate with variables not involved in the clustering), an Analysis of Variance (ANOVA) was conducting to test for significant differences between the clusters on <strong>Grit</strong>. A Tukey-Kramer test was used for post hoc comparisons between the clusters. Results indicated significant differences between the clusters on <strong>Grit </strong>(F(2, 2610)=236.6, p&lt;.0001).</p><p>The tukey post hoc comparisons showed significant differences between clusters on Grit. Respondant in cluster 0had the highest Grit (mean=3.53 on a scale of 0 to 5, sd=0.63), and cluster 2 had the lowest Grit(mean=2.87, sd=0.61).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8cfbeea85c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning for Data Analysis Week 3]]></title>
            <link>https://medium.com/@TristanB/machine-learning-for-data-analysis-week-3-f9f20dadd49?source=rss-37b9a43bb674------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9f20dadd49</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Tristan Boudreault]]></dc:creator>
            <pubDate>Fri, 19 Feb 2016 02:54:07 GMT</pubDate>
            <atom:updated>2016-02-20T02:18:02.803Z</atom:updated>
            <content:encoded><![CDATA[<h4>Context</h4><p>In this project we are trying to establish links between personality traits and <strong>Grit</strong>. <strong>Grit </strong>is the tendency to sustain interest in and effort toward very long-term goals. Research has established the predictive power of <strong>Grit</strong> over and beyond measures of talent, for objectively measured success outcomes. For instance, in prospective longitudinal studies, <strong>Grit </strong>predicts surviving the arduous first summer of training at West Point and reaching the final rounds of the National Spelling Bee, retention in the U.S. Special Forces, retention and performance among novice teachers and sales agents, and graduation from Chicago public high schools.</p><p>The general consensus in academic psychology is that there are five fundamental personality traits from which derives an individual personality. They are: <strong>Extroversion</strong>, <strong>Conscientiousness</strong>, <strong>Neuroticism</strong>, <strong>Agreeableness</strong>, <strong>Openness</strong>. You can read more on the traits and the data used <a href="https://medium.com/@TristanB/regression-modeling-week-1-4122a63fbed3#.m4e62a52x">here</a>. They have been used as well as some socio-demographic variables in the analysis below.</p><h4>Lasso regression</h4><p>— <a href="https://wakari.io/sharing/bundle/TristanB/Lasso%20Regression">Python code here</a> — <br>A lasso regression analysis was conducted to identify a subset of variables from a pool of 47 binary categorical and quantitative predictor variables that best predicted a quantitative response variable measuring <strong>High Grit</strong>.</p><p><strong>Preparing the data<br></strong>Each categorical predictor has been converted to as many binary variables as there were categories in it. For instance the married categorical variable — <em>What is your marital status?</em> — that could take three values has been decomposed in three binary predictors (often called dummy variables):<br> -Never married (0 False, 1 True)<br> -Currently married (0 False, 1 True)<br> -Previously married (0 False, 1 True)<br>Since categorical predictors don’t work in linear regressions.</p><p>Quantitative predictor variables include age, number of siblings from the same mother and the five fundamental personality traits.</p><p>All predictor variables were standardized to have a mean of zero and a standard deviation of one.</p><p>Data were randomly split into a training set that included 70% of the observations (N=2630) and a test set that included 30% of the observations (N=1127). The least angle regression algorithm with k=10 fold cross validation was used to estimate the lasso regression model in the training set, and the model was validated using the test set. The change in the cross validation average (mean) squared error at each step was used to identify the best subset of predictor variables.</p><p><strong>Results</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*wFIJ5HrtHMnDJdwLqTopGw.png" /><figcaption>Figure 1. Change in the validation mean square error at each step</figcaption></figure><p>Of the 47 predictor variables, 17 were retained in the selected model. During the estimation process, <strong>Conscientiousness</strong> and <strong>Neuroticism</strong> were most strongly associated with <strong>High Grit</strong>, followed by Black ethnicity and <strong>Extraversion</strong>. Having at most a high school education was negatively associated with <strong>High Grit</strong>. Other predictors associated with <strong>High Grit</strong> are indicated in the table below. In green are the variables positively associated with <strong>High Grit</strong>, and in red those negatively associated with the response variable. These 18 variables accounted for 28.9% of the variance in the <strong>High Grit</strong> response variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/1*C5iaaSpzugGhmVSay6plBg.png" /><figcaption>Fig 2. Variable coefficients in green positively associated, in red negatively associated in grey removed</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9f20dadd49" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning for Data Analysis Week 2]]></title>
            <link>https://medium.com/@TristanB/machine-learning-for-data-analysis-week-2-994243edc5b?source=rss-37b9a43bb674------2</link>
            <guid isPermaLink="false">https://medium.com/p/994243edc5b</guid>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Tristan Boudreault]]></dc:creator>
            <pubDate>Sat, 13 Feb 2016 02:08:53 GMT</pubDate>
            <atom:updated>2016-02-13T02:08:53.323Z</atom:updated>
            <content:encoded><![CDATA[<h4>Context</h4><p>In this project we are trying to establish links between personality traits and<strong>Grit</strong>. <strong>Grit </strong>is the tendency to sustain interest in and effort toward very long-term goals. Research has established the predictive power of <strong>Grit</strong> over and beyond measures of talent, for objectively measured success outcomes. For instance, in prospective longitudinal studies, <strong>Grit </strong>predicts surviving the arduous first summer of training at West Point and reaching the final rounds of the National Spelling Bee, retention in the U.S. Special Forces, retention and performance among novice teachers and sales agents, and graduation from Chicago public high schools.</p><p>The general consensus in academic psychology is that there are five fundamental personality traits from which derives an individual personlaty. They are: <strong>Extroversion</strong>, <strong>Conscientiousness</strong>, <strong>Neuroticism</strong>, <strong>Agreeableness</strong>,<strong>Openness</strong>. You can read more on the traits and the data used <a href="https://medium.com/@TristanB/regression-modeling-week-1-4122a63fbed3#.m4e62a52x">here</a>. They have been used as well as some socio-demographic variables in the analysis below.</p><h4>Random Forest analysis</h4><p><a href="https://wakari.io/sharing/bundle/TristanB/Random%20forest">-Python code used to run the analysis here</a>-</p><p>Random forest analysis was performed to evaluate the importance of a series of explanatory variables in predicting a binary, categorical response variable (presence or absence of <strong>High Grit</strong> in a respondant’s personality). The following explanatory variables were included as possible contributors to a random forest evaluating <strong>High Grit</strong> (theresponse variable):</p><p><strong>extroversion </strong>(continuous variable scored between 0 and 5)</p><p><strong>conscientiousness </strong>(continuous variable scored between 0 and 5)</p><p><strong>neuroticism </strong>(continuous variable scored between 0 and 5)</p><p><strong>agreableness </strong>(continuous variable scored between 0 and 5)</p><p><strong>openness </strong>(continuous variable scored between 0 and 5)</p><p><strong>education </strong>“How much education have you completed?”<br> 1=Less than high school,<br> 2=High school,<br> 3=University degree,<br> 4=Graduate degree</p><p><strong>urban </strong>“What type of area did you live when you were a child?”<br> 1=Rural (country side),<br> 2=Suburban,<br> 3=Urban (town, city)</p><p><strong>gender </strong>“What is your gender?”<br> 1=Male,<br> 2=Female,<br> 3=Other<br><br><strong>age </strong>“How many years old are you?” (continuous variable)</p><p><strong>hand </strong>“What hand do you use to write with?”<br> 1=Right,<br> 2=Left,<br> 3=Both</p><p><strong>religion </strong>“What is your religion?”<br> 1=Agnostic,<br> 2=Atheist,<br> 3=Buddhist,<br> 4=Christian (Catholic),<br> 5=Christian (Mormon),<br> 6=Christian (Protestant),<br> 7=Christian (Other),<br> 8=Hindu,<br> 9=Jewish,<br> 10=Muslim,<br> 11=Sikh,<br> 12=Other</p><p><strong>orientation </strong>“What is your sexual orientation?”<br> 1=Heterosexual,<br> 2=Bisexual,<br> 3=Homosexual,<br> 4=Asexual,<br> 5=Other</p><p><strong>race </strong>“What is your race?” <br> 1=Asian,<br> 2=Arab,<br> 3=Black,<br> 4=Indigenous Australian, Native American or White,<br> 5=Other</p><p><strong>voted </strong>“Have you voted in a national election in the past year?”<br> 1=Yes,<br> 2=No</p><p><strong>married </strong>“What is your marital status?”<br> 1=Never married,<br> 2=Currently married,<br> 3=Previously married</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*R4evKKQieViJjdVZ9ZLdDQ.png" /><figcaption>Random forest result</figcaption></figure><p><strong>Result interpretation</strong></p><p>The explanatory variables with the highest relative importance scores were conscientiousness, neuroticism and age. The accuracy of the random forest was 82.5%, with the subsequent growing of multiple trees rather than a single tree, adding little to the overall accuracy of the model (79% with only one tree), and suggesting that interpretation of a single decision tree may be appropriate.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=994243edc5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning for Data Analysis week 1]]></title>
            <link>https://medium.com/@TristanB/machine-learning-for-data-analysis-week-1-66e07745edaf?source=rss-37b9a43bb674------2</link>
            <guid isPermaLink="false">https://medium.com/p/66e07745edaf</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[psychology]]></category>
            <dc:creator><![CDATA[Tristan Boudreault]]></dc:creator>
            <pubDate>Mon, 08 Feb 2016 02:33:39 GMT</pubDate>
            <atom:updated>2016-02-08T02:33:39.218Z</atom:updated>
            <content:encoded><![CDATA[<h4>Context</h4><p>In this project we are trying to establish links between personality traits and <strong>Grit</strong>. <strong>Grit </strong>is the tendency to sustain interest in and effort toward very long-term goals. Research has established the predictive power of <strong>Grit</strong> over and beyond measures of talent, for objectively measured success outcomes. For instance, in prospective longitudinal studies, <strong>Grit </strong>predicts surviving the arduous first summer of training at West Point and reaching the final rounds of the National Spelling Bee, retention in the U.S. Special Forces, retention and performance among novice teachers and sales agents, and graduation from Chicago public high schools.</p><p>The general consensus in academic psychology is that there are five fundamental personality traits from which derives an individual personlaty. They are: <strong>Extroversion</strong>, <strong>Conscientiousness</strong>, <strong>Neuroticism</strong>, <strong>Agreeableness</strong>, <strong>Openness</strong>. You can read more on the traits and the data used <a href="https://medium.com/@TristanB/regression-modeling-week-1-4122a63fbed3#.m4e62a52x">here</a>.</p><h4>Decision tree results</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*TLePimPXN_LvBnfLaSewUw.png" /></figure><p>In python (<a href="http://pastebin.com/raw/MRhaVCuu">see code here</a>), a decision tree analysis was performed to test nonlinear relationships among a series of explanatory variables and a binary, categorical response variable. For the present analyses, the entropy “goodness of split” criterion was used to grow the tree and a cost complexity algorithm was used for pruning the full tree into a final subtree.</p><p>The following explanatory variables were included as possible contributors to a classification tree model evaluating <strong>High Grit</strong>(my response variable) and the five big peronality traits: <strong>Extraversion </strong>(X[0] in the code), <strong>Neuroticism </strong>(X[1] in the code), <strong>Agreableness </strong>(X[2] in the code), <strong>Conscientiousness </strong>(X[3] in the code), <strong>Openness </strong>(X[4] in the code). Each of these variables contain a score on a scale from 0.0 to 5.0.</p><p>The <strong>Conscientiousness </strong>score was the first variable to separate the sample into two subgroups:</p><ol><li>Of the respondants with <strong>Conscientiousness </strong>scores less than or equal to 3.75, a further subdivision was made with <strong>Conscientiousness </strong>scores below or equal to 3.15. Respondants who had a score equal or under that threshold were less likely to have <strong>High Grit </strong>(5.7% vs. 19.3%).</li><li>Of the respondants with <strong>Conscientiousness </strong>scores greater than 3.75, a further subdivision was made with <strong>Neurotiscism </strong>scores below or equal to 3.45. Respondants who had a score equal or under that threshold were less likely to have <strong>High Grit </strong>(38.9% vs. 67.5%).</li></ol><p>The total model classified 81% of the sample correctly, 83% of respondants with <strong>High Grit</strong>(sensitivity) and 66% of respondants without <strong>High Grit </strong>(specificity).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66e07745edaf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Regression modeling week 4]]></title>
            <link>https://medium.com/@TristanB/regression-modeling-week-4-da9fafd55ff9?source=rss-37b9a43bb674------2</link>
            <guid isPermaLink="false">https://medium.com/p/da9fafd55ff9</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Tristan Boudreault]]></dc:creator>
            <pubDate>Mon, 01 Feb 2016 02:01:09 GMT</pubDate>
            <atom:updated>2016-02-01T02:01:09.821Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://wakari.io/sharing/bundle/TristanB/Week4">Python code here</a></p><h4>Context</h4><p>In this project we are trying to establish links between personality traits and <strong>Grit</strong>. <strong>Grit </strong>is the tendency to sustain interest in and effort toward very long-term goals. Research has established the predictive power of <strong>Grit</strong> over and beyond measures of talent, for objectively measured success outcomes. For instance, in prospective longitudinal studies, <strong>Grit </strong>predicts surviving the arduous first summer of training at West Point and reaching the final rounds of the National Spelling Bee, retention in the U.S. Special Forces, retention and performance among novice teachers and sales agents, and graduation from Chicago public high schools.</p><p>The general consensus in academic psychology is that there are five fundamental personality traits from which derives an individual personlaty. They are: Extroversion, Conscientiousness, Neuroticism, Agreeableness, Openness. You can read more on the traits and the data used <a href="https://medium.com/@TristanB/regression-modeling-week-1-4122a63fbed3#.m4e62a52x">here</a>.</p><h4>Hypothesis</h4><p>For this logistic regression exercice, Grit score of the participants (a quantititive variable from 0 to 5) has been recoded to be a binary categorical variable 1: <strong>High Grit</strong> (In the 4th quartile) 0: Not High Grit.</p><p>Out hypothesis is that Conscientiousness is positively associated with <strong>High Grit </strong>and in a greater measure than other personality traits.</p><h4>Results</h4><p>As anticipated, after adjusting for potential confounding factors (Extroversion, Agreeableness, Openness, education level, gender, age, dominant hand, sexual orientation, martial status and family size), the odds of having <strong>High Grit</strong> were more than two times higher for each point in Conscientiousness a participant scored (OR=6.42, 95% CI = 5.43–7.59, p&lt;.0001). To a lesser extent the same holds true for all the other personality traits:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*Vfhq1pJHLrm3LwECXfXydA.png" /><figcaption>Statistical results of a logistic regression for High Grit</figcaption></figure><p>We only looking at the association between Conscientionsouness and High Grit, we detect a high association than with the model above(OR=7.45, 95% CI = 6.37–8.72, p&lt;.0001). This means that there is some like confounding with the other traits.</p><p>Education was also significantly associated with Hight Grit, such that more educated participants were significantly more likely to have High Grit (OR= 1.22, 95% CI=1.01 — 1.37, p&lt;.0001).</p><p>We found no significant associations with the others variables of the model.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da9fafd55ff9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Regression Modeling week 3]]></title>
            <link>https://medium.com/@TristanB/regression-modeling-week-3-f84a505ff7b6?source=rss-37b9a43bb674------2</link>
            <guid isPermaLink="false">https://medium.com/p/f84a505ff7b6</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[psychology]]></category>
            <dc:creator><![CDATA[Tristan Boudreault]]></dc:creator>
            <pubDate>Mon, 25 Jan 2016 02:58:24 GMT</pubDate>
            <atom:updated>2016-01-25T03:00:09.090Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://wakari.io/sharing/bundle/TristanB/Regression%20modeling%20week%203">Python source code for this post here</a></p><h4>Context</h4><p>In this project we are trying to establish links between personality traits and <strong>Grit</strong>. <strong>Grit </strong>is the tendency to sustain interest in and effort toward very long-term goals. Research has established the predictive power of <strong>Grit</strong> over and beyond measures of talent, for objectively measured success outcomes. For instance, in prospective longitudinal studies, <strong>Grit </strong>predicts surviving the arduous first summer of training at West Point and reaching the final rounds of the National Spelling Bee, retention in the U.S. Special Forces, retention and performance among novice teachers and sales agents, and graduation from Chicago public high schools.</p><p>The general consensus in academic psychology is that there are five fundamental personality traits from which derives an individual personlaty. They are: Extraversion, Conscientiousness, Neuroticism, Agreeableness, Openness. You can read more on the traits and the data used <a href="https://medium.com/@TristanB/regression-modeling-week-1-4122a63fbed3#.m4e62a52x">here</a>.</p><h4>Multiple regressions</h4><p>After analyzing Couscientiousness’ association on its own with <strong>Grit </strong><a href="https://medium.com/@TristanB/regression-modeling-week-2-1cd6987e89b7#.l3jolg181">last week</a>, we are now expanding the analysis to the five traits as well as 12 socio-democraphic variables collected during an online personality test.</p><p>Even when controling for other variable Conscientiousness still has a significant association with Grit. In addition, Extraversion, Neuroticism, Agreableness, education, age and religion all have p-values that are less than 0.05, and have parameter positive estimates indicating that they are significantly associated with <strong>Grit </strong>after partialing out the part of the association that can be accounted for by the other 16 variables.</p><p>Here’s a recap of the 17 variables and their results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*hvwWO7dmN_ZozNf_xFKzMw.png" /><figcaption>Multiple linear regressions result</figcaption></figure><h4>Evaluation of the model</h4><p>To verify the assumption that the residual from our model are normally distributed we’re plotting them in a qqplot. What we’re looking for is to see if the points follow a straight line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*aULlUZr8AJZFr__9msoT8A.png" /><figcaption>Model’s qqplot</figcaption></figure><p>The qqplot for this model shows that the residual follow closely a straight line and that the assumption of normality of the residuals’ distribution is met.</p><p>To further evaluate the overal fit of our model we plot the normalized residual.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*cUpR80mzAmLUnWA5yqmwCQ.png" /><figcaption>Model’s normalized residual plot</figcaption></figure><p>The normalization of the residual show that few respondants residual fall above or below 2 standard deviations from the mean. We have some points that are more than 3 standard deviations from the mean indicating we have some extreme outliers but they represent less than 1% of the values so there is no evidence that the rror of our model is unacceptable.</p><p>A leverage plot, however, brings light to some outliers that have undue influence on the estimation of the regression model. An outlier is an observation that is more than 2 standard deviations avway form the mean. In the following plot we see two ovious points (444 and 2802) that are below the -2 line (thus are outliers) and have a very large influence on the model (far on the right).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*tW-qv3mPAA-ATJRHRaRr5g.png" /><figcaption>Leverage plot</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f84a505ff7b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Regression modeling week 2]]></title>
            <link>https://medium.com/@TristanB/regression-modeling-week-2-1cd6987e89b7?source=rss-37b9a43bb674------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cd6987e89b7</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[psychology]]></category>
            <dc:creator><![CDATA[Tristan Boudreault]]></dc:creator>
            <pubDate>Sat, 16 Jan 2016 18:30:27 GMT</pubDate>
            <atom:updated>2016-02-19T12:47:55.848Z</atom:updated>
            <content:encoded><![CDATA[<p>PYTHON CODE CAN BE FOUND HERE: <a href="https://wakari.io/sharing/bundle/TristanB/Regression%20modeling%20week%202">https://wakari.io/sharing/bundle/TristanB/Regression%20modeling%20week%202</a></p><p>The first explanatory variable being analyzed is consciousness. The general consensus in academic psychology is that there are five fundamental personality traits. They are Extraversion, <strong>Conscientiousness</strong>, Neuroticism, Agreeableness, Openness. <strong>Conscientiousness </strong>reflects how careful and orderly an individual is (you can read more on the other traits here: <a href="https://medium.com/@TristanB/regression-modeling-week-1-4122a63fbed3#.m4e62a52x">https://medium.com/@TristanB/regression-modeling-week-1-4122a63fbed3#.m4e62a52x</a> ).</p><p>Our subjects <strong>Conscientiousness </strong>was scored on a scale of 1 to 5 with an average of 3.35.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*Jge-6g1VJy7n2bTZui82ow.png" /><figcaption>Conscientiouness distribution among the participants</figcaption></figure><p>The first step of the analysis is to center the values so that the mean becomes 0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*6alfYoNMSJfEICjFgsD-1g.png" /><figcaption>»djusted conscientiouness distribution among the participants</figcaption></figure><p>We can then run an ordinary least square regression to see if this trait is associated with grit. The results of the linear regression model indicates that <strong>Conscientiousness </strong>( p&lt;=.0001) was significantly and positively associated with grit. For each point in conscientiouness we can expect an individual to have a grit score around 0.6 higher (regression coefficient 0.5988).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*TZ-uLp0v3kWu4WXuL6DFQQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cd6987e89b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Regression modeling week 1]]></title>
            <link>https://medium.com/@TristanB/regression-modeling-week-1-4122a63fbed3?source=rss-37b9a43bb674------2</link>
            <guid isPermaLink="false">https://medium.com/p/4122a63fbed3</guid>
            <dc:creator><![CDATA[Tristan Boudreault]]></dc:creator>
            <pubDate>Sun, 10 Jan 2016 03:17:27 GMT</pubDate>
            <atom:updated>2016-01-10T03:21:48.102Z</atom:updated>
            <content:encoded><![CDATA[<p>Regression modeling week 1</p><h3>Context</h3><p>The general consensus in academic psychology is that there are five fundamental personality traits:</p><ul><li><strong>Extraversion</strong>: Extraversion reflects how much you are oriented towards things outside yourself and derive satisfaction from interacting with other people.</li><li><strong>Conscientiousness</strong>: Conscientiousness reflects how careful and orderly an individual is.</li><li><strong>Neuroticism</strong>: Neuroticism is the tendency to experience negative emotions.</li><li><strong>Agreeableness</strong>: Agreeableness reflects how much you like and try please others.</li><li><strong>Openness</strong>: Openness reflects how much you seek out new experiences.</li></ul><p>When it is said that there are five fundamental personality traits, it is meant that there are only five traits that are completely independent (knowing someones level of one trait gives you no information about their level on any of the others) and all other personality traits will be correlated with one or more of the big five. With this data we are attempting to evaluate if any of these traits is a good predictor of a persons’s grit.</p><h3>Data collection</h3><p>This data was collected through an on-line personality test open to anyone, from. At the end of the personality test, users were asked if their answers were accurate and would be willing to complete an additional survey. At the end of the additional survey users were asked if their answers were accurate and their data could be used for research. This dataset consists of exclusively participants over 13 years old who consented yes at both parts. The answer of 4 720 people were kept.</p><p>The first part of the test uses public domain scales from the International Personality Item Pool to asses the user’s score on each of the big five traits. It can be found here: <a href="http://personality-testing.info/tests/BIG5.php">http://personality-testing.info/tests/BIG5.php</a></p><p>These questions allow to evalute a person on a scale from 1 to 5 for each trait. It is estimated the general population distribution (not just people of answered the tests) for each of these trait follows these curves:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/0*vKP6CfV1X0ynZ7ug.png" /></figure><p>Then came the supplemental survey, if they agreed to it (only individuals who opted into the supplemental survey are included in this dataset). Twelve questions were asked to rate the user’s grit on a scale from 1 to 5. The maximum score on this scale is 5 (extremely gritty), and the lowest score on this scale is 1 (not at all gritty).</p><h3>Data codebook</h3><h3>Big five test</h3><p>For the big five test, the following items were rated on a five point scale where 1=Disagree, 3=Neutral, 5=Agree (0=missed). All were presented on one page in the order E1, N2, A1, C1, O1, E2……</p><ul><li><strong>E1</strong>: I am the life of the party.</li><li><strong>E2</strong>: I don’t talk a lot.</li><li><strong>E3</strong>: I feel comfortable around people.</li><li><strong>E4</strong>: I keep in the background.</li><li><strong>E5</strong>: I start conversations.</li><li><strong>E6</strong>: I have little to say.</li><li><strong>E7</strong>: I talk to a lot of different people at parties.</li><li><strong>E8</strong>: I don’t like to draw attention to myself.</li><li><strong>E9</strong>: I don’t mind being the center of attention.</li><li><strong>E10</strong>: I am quiet around strangers.</li><li><strong>N1</strong>: I get stressed out easily.</li><li><strong>N2</strong>: I am relaxed most of the time.</li><li><strong>N3</strong>: I worry about things.</li><li><strong>N4</strong>: I seldom feel blue.</li><li><strong>N5</strong>: I am easily disturbed.</li><li><strong>N6</strong>: I get upset easily.</li><li><strong>N7</strong>: I change my mood a lot.</li><li><strong>N8</strong>: I have frequent mood swings.</li><li><strong>N9</strong>: I get irritated easily.</li><li><strong>N10</strong>: I often feel blue.</li><li><strong>A1</strong>: I feel little concern for others.</li><li><strong>A2</strong>: I am interested in people.</li><li><strong>A3</strong>: I insult people.</li><li><strong>A4</strong>: I sympathize with others’ feelings.</li><li><strong>A5</strong>: I am not interested in other people’s problems.</li><li><strong>A6</strong>: I have a soft heart.</li><li><strong>A7</strong>: I am not really interested in others.</li><li><strong>A8</strong>: I take time out for others.</li><li><strong>A9</strong>: I feel others’ emotions.</li><li><strong>A10</strong>: I make people feel at ease.</li><li><strong>C1</strong>: I am always prepared.</li><li><strong>C2</strong>: I leave my belongings around.</li><li><strong>C3</strong>: I pay attention to details.</li><li><strong>C4</strong>: I make a mess of things.</li><li><strong>C5</strong>: I get chores done right away.</li><li><strong>C6</strong>: I often forget to put things back in their proper place.</li><li><strong>C7</strong>: I like order.</li><li><strong>C8</strong>: I shirk my duties.</li><li><strong>C9</strong>: I follow a schedule.</li><li><strong>C10</strong>: I am exacting in my work.</li><li><strong>O1</strong>: I have a rich vocabulary.</li><li><strong>O2</strong>: I have difficulty understanding abstract ideas.</li><li><strong>O3</strong>: I have a vivid imagination.</li><li><strong>O4</strong>: I am not interested in abstract ideas.</li><li><strong>O5</strong>: I have excellent ideas.</li><li><strong>O6</strong>: I do not have a good imagination.</li><li><strong>O7</strong>: I am quick to understand things.</li><li><strong>O8</strong>: I use difficult words.</li><li><strong>O9</strong>: I spend time reflecting on things.</li><li><strong>O10</strong>: I am full of ideas.</li></ul><h3>Grit test</h3><p>For the grit test the following items were rated on a five point scale where 1=Very much like me, 2=Mostly like me, 3=Somewhat like me, 4=Not much like me, 5=Not like me at all:</p><ul><li><strong>GS1</strong>: I have overcome setbacks to conquer an important challenge.</li><li><strong>GS2</strong>: New ideas and projects sometimes distract me from previous ones.</li><li><strong>GS3</strong>: My interests change from year to year.</li><li><strong>GS4</strong>: Setbacks don’t discourage me.</li><li><strong>GS5</strong>: I have been obsessed with a certain idea or project for a short time but later lost interest</li><li><strong>GS6</strong>: I am a hard worker.</li><li><strong>GS7</strong>: I often set a goal but later choose to pursue a different one</li><li><strong>GS8</strong>: I have difficulty maintaining my focus on projects that take more than a few months to complete</li><li><strong>GS9</strong>: I finish whatever I begin.</li><li><strong>GS10</strong>: I have achieved a goal that took years of work.</li><li><strong>GS11</strong>: I become interested in new pursuits every few months.</li><li><strong>GS12</strong>: I am diligent.</li></ul><h3>Validity test variables</h3><p>The following items were presented as a check-list and subjects were instructed “In the grid below, check all the words whose definitions you are sure you know”. A value of 1 is checked, 0 means unchecked. The words at VCL6, VCL9, and VCL12 are not real words and can be used as a validity check:</p><ul><li><strong>VCL1</strong>: boat</li><li><strong>VCL2</strong>: incoherent</li><li><strong>VCL3</strong>: pallid</li><li><strong>VCL4</strong>: robot</li><li><strong>VCL5</strong>: audible</li><li><strong>VCL6</strong>: cuivocal</li><li><strong>VCL7</strong>: paucity</li><li><strong>VCL8</strong>: epistemology</li><li><strong>VCL9</strong>: florted</li><li><strong>VCL10</strong>: decide</li><li><strong>VCL11</strong>: pastiche</li><li><strong>VCL12</strong>: verdid</li><li><strong>VCL13</strong>: abysmal</li><li><strong>VCL14</strong>: lucid</li><li><strong>VCL15</strong>: betray</li><li><strong>VCL16</strong>: funny</li></ul><h3>Demographic variables</h3><p>A bunch more questions were then asked:</p><ul><li><strong>education</strong>: “How much education have you completed?” 1=Less than high school, 2=High school, 3=University degree, 4=Graduate degree.</li><li><strong>urban</strong>: “What type of area did you live when you were a child?” 1=Rural (country side), 2=Suburban, 3=Urban (town, city).</li><li><strong>gender</strong>: “What is your gender?” 1=Male, 2=Female, 3=Other.</li><li><strong>engnat</strong>: “Is English your native language?” 1=Yes, 2=No.</li><li><strong>age</strong>: “How many years old are you?”.</li><li><strong>hand</strong>: “What hand do you use to write with?” 1=Right, 2=Left, 3=Both.</li><li><strong>religion</strong>: “What is your religion?” 1=Agnostic, 2=Atheist, 3=Buddhist, 4=Christian (Catholic), 5=Christian (Mormon), 6=Christian (Protestant), 7=Christian (Other), 8=Hindu, 9=Jewish, 10=Muslim, 11=Sikh, 12=Other.</li><li><strong>orientation</strong>: “What is your sexual orientation?” 1=Heterosexual, 2=Bisexual, 3=Homosexual, 4=Asexual, 5=Other.</li><li><strong>race</strong>: “What is your race?” 1=Asian, 2=Arab, 3=Black, 4=Indigenous Australian, Native American or White, 5=Other.</li><li><strong>voted</strong>: “Have you voted in a national election in the past year?” 1=Yes, 2=No.</li><li><strong>married</strong>: “What is your marital status?” 1=Never married, 2=Currently married, 3=Previously married.</li><li><strong>familysize</strong>: “Including you, how many children did your mother have?”.</li></ul><h3>Technical information variables</h3><p>This data was collected over several pages, the time on each page was recorded:</p><ul><li><strong>introelapse</strong>: The time spent (in seconds) on the introduction page to the big five personality test, had an introduction to the big five and a policies statement.</li><li><strong>testelapse</strong>: The time spent (in seconds) on the body of the big five personality test.</li><li><strong>surveyelapse</strong>: The time spent (in seconds) on the additonal survey.</li></ul><p>Some other values were calculated from technical information:</p><ul><li><strong>country</strong>: ISO country code</li><li><strong>operatingsystem</strong>: The operating system of the users computer, determined from HTTP user agent</li><li><strong>browser</strong>: The browser the user is using, determined from HTTP user agent</li><li><strong>screenw</strong>: The width of the users screen in pixels, from javascript</li><li><strong>screenh</strong>: The height of the users screen in pixels, from javascript</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4122a63fbed3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>