<?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 Emma Vitz on Medium]]></title>
        <description><![CDATA[Stories by Emma Vitz on Medium]]></description>
        <link>https://medium.com/@emmavitz?source=rss-425ae0696b6d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rtQD9AR9amLGtGUrukhIDQ.jpeg</url>
            <title>Stories by Emma Vitz on Medium</title>
            <link>https://medium.com/@emmavitz?source=rss-425ae0696b6d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 07:45:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@emmavitz/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[Is Collaboration in Science Split Along Gender Lines?]]></title>
            <link>https://medium.com/@emmavitz/is-collaboration-in-science-split-along-gender-lines-7dba48f4269?source=rss-425ae0696b6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7dba48f4269</guid>
            <category><![CDATA[network-analysis]]></category>
            <category><![CDATA[diversity]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[women-in-stem]]></category>
            <category><![CDATA[r]]></category>
            <dc:creator><![CDATA[Emma Vitz]]></dc:creator>
            <pubDate>Sun, 29 Apr 2018 08:37:30 GMT</pubDate>
            <atom:updated>2018-04-29T08:37:30.384Z</atom:updated>
            <content:encoded><![CDATA[<h3>Is Collaboration in Science Split Along Gender Lines? Network Analysis in R</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*2GNMiFTX9Z4G6HFktG-jpg.jpeg" /></figure><p>When it comes to collaboration in science, who works with whom? This is one of the questions I wanted to tackle as part of my internship at <a href="http://www.tepunahamatatini.ac.nz/">Te Pūnaha Matatini.</a></p><p>To analyse this, we looked at collaboration in the <a href="https://www.royalsociety.org.nz/what-we-do/funds-and-opportunities/marsden">Marsden Fund</a>, one of the largest research funds in New Zealand. <a href="https://github.com/EmVitz/Te_Punaha_Matatini_Internship/blob/master/Marsden_Predicted_Gender.csv">Our data</a> goes from 2008 to 2017 and includes details on the successful applications to the fund over those 10 years.</p><p>You can see the <a href="https://github.com/EmVitz/Te_Punaha_Matatini_Internship/blob/master/Marsden_Predicted_Gender.csv">data</a>, <a href="https://github.com/EmVitz/Te_Punaha_Matatini_Internship/blob/master/Marsden%20Network%20Analysis.R">R code</a> and <a href="https://github.com/EmVitz/Te_Punaha_Matatini_Internship/blob/master/Network%20Analysis%20in%20R.pptx">slides</a> for this analysis on github.</p><h3><strong>An Overview of the Marsden Fund from 2008 to 2017</strong></h3><p>To understand the network of collaboration, it helps to first have an overview of the last ten years of the Marsden fund.</p><p>The Marsden fund grants money to fundamental research across a wide variety of disciplines — everything from the Humanities to Mathematics &amp; Information Sciences and Biomedical Sciences.</p><p>These disciplines are represented by <a href="https://royalsociety.org.nz/what-we-do/funds-and-opportunities/marsden/about/marsden-fund-panels/">panels</a>, who decide which proposals to fund in a given year. There are currently ten panels that make up the Marsden Fund. In 2010, the panel Physical Sciences and Engineering split into two panels (Physics, Chemistry &amp; Biochemistry and Engineering &amp; Interdisciplinary Sciences).</p><p>From 2008 to 2017, the Marsden fund has funded 1029 proposals and 2284 researchers.</p><h4><strong>Do Male and Female Researchers Collaborate with the Same Number of People?</strong></h4><p>One of the first things I wanted to know was whether men and women collaborate with the same number of people, on average.</p><p>Collaborations, in this case, are working together on a funded proposal. If I work on a proposal with 3 other people in one year, and later on another proposal with 1 other person, I would have collaborated with 4 people in total.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jeeD03xTfD1n2Kkx6CoF8w.png" /></figure><p>Male and female researchers do collaborate with the same number of people, on average. The numbers are remarkably similar, with a mean of 3.9 collaborators and a median of 3 collaborators per researcher for both men and women.</p><h4><strong>The Gender Split of each Panel</strong></h4><p>Next, I wanted to look into the overall gender split of the researchers that each of the panels funded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HWHgmyqPyc8bd5L_Q-tc1g.png" /></figure><p>As we can see, most panels are far from achieving gender parity.</p><p>Some panels do have an even gender split — the Humanities and Social Sciences achieve about 50/50, and Economics &amp; Human and Behavioural Sciences comes close. But others are far from it. Mathematics and Information Sciences scrape in with 14% female researchers, and Physics, Chemistry and Biochemistry aren’t doing much better.</p><p>For the most part, these are the typical patterns we see over and over again; STEM fields have the least gender diversity, while the Arts have better representation of women.</p><h4><strong>The Representation of Women over Time</strong></h4><p>Has this changed over time? Are there fields that have made real progress towards gender parity in the past 10 years?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AVwAyLCOJ0989OXMR33E0Q.png" /></figure><p>The overall proportion of female researchers has risen from 23% in 2008 to 33% in 2017, so there has definitely been some improvement over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UxeOuug6fRpE7FcO1_NqOw.png" /></figure><p>Some fields have shown greater improvement than others. Many of these are fields had very low representation of women to begin with. Ecology, Evolution and Behaviour is one example, with 5% female researchers in 2008 and 27% female researchers in 2017. The Social Sciences are an exception to this, at 37% female researchers in 2008 and 66% in 2017.</p><p>Other panels have remained largely the same in terms of gender breakdown. For example, Cellular, Molecular &amp; Physiological Biology had 21% female researchers in both 2008 and 2017.</p><h3><strong>The Network of Science in New Zealand</strong></h3><p>Plotting the network was the part of the research that I was looking forward to the most. It’s exciting to see all of the connections in a single image.</p><p>To plot a network, we need to have a nodes table and an edges table.</p><p>In this case, each node is a researcher. The nodes table will therefore be made up of the names and genders of all of the researchers.</p><p>The edges table gives us information on how the nodes are connected to one another. Therefore, each row on the edges table will be a collaboration between two people. It contains their names, the proposal they worked on, what year it was in and which panel they submitted it to.</p><p>I used ggplot2 to plot the networks. This allows you to take advantage of any past experience you have in ggplot2, and makes it easy to adjust elements of the image.</p><p>To create the network, we use <em>fortify</em> and <em>as.edgedf</em>. These functions come from the geomnet package, and allow us to create a dataframe that can be plotted as a network using ggplot2 and <em>geom_net</em>.</p><h4><strong>By Gender</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Ir66HneGrUzjBmppBFC1g.png" /></figure><p>As you can see, the network coloured by gender shows that there are fewer female researchers overall. Given the proportions we saw earlier, this is to be expected.</p><p>However, it does seem like the female researchers are relatively well integrated into the network. We don’t see two separate or very disconnected networks coloured by gender.</p><h4><strong>By Panel</strong></h4><p>We can also plot the network coloured by panel. This requires a slightly different nodes table, because a few researchers have submitted proposals to multiple panels. Each row here is a researcher, their gender and the panel they submitted to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ipk_GRN5ME6D64ag2Bn2Kw.png" /></figure><p>The network coloured by panel shows very clearly that some disciplines are more interconnected than others. Earth Sciences and Astronomy shows very strong connectivity among almost all of the researchers funded by this panel. All of the other disciplines show much less connectivity, with most networks being small and many being closed.</p><p>Many of the proposals funded by the Earth Sciences and Astronomy panel involve research in remote areas such as Antarctica. This type of research might naturally require more collaboration. Earth Sciences and Astronomy is also the panel with the largest number of researchers per proposal (4.9 on average, as opposed to 2.7 for other panels), which contributes to the interconnectedness of this group of researchers.</p><h3><strong>Birds of a Feather Flock Together — Analysing Homophily in Science</strong></h3><p>Having visually assessed the network plotted by gender, I wanted to measure whether researchers were more likely to collaborate with other researchers of the same gender.</p><p>Homophily is the tendency to associate and bond with other people who are similar to you. Do we see gender homophily in scientific collaboration?</p><p>Firstly, I looked at the proportion of female collaborators that researchers had, by gender.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5y-rk88IiP1euUi0GCpZQ.png" /></figure><p>This shows clearly that both men and women are likely to have a low proportion of female collaborators. This trend is stronger for male researchers, many of whom had no female collaborators at all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VbzprzHQgWYn5snXSkgl4Q.png" /></figure><p>As we would expect, the graph of the proportion of male collaborators by the gender of the researcher shows the inverse trend.</p><h4><strong>Taking into Account the Gender Makeup of the Field</strong></h4><p>However, this doesn’t take into account the proportion of each gender in the field that a given researcher is working in.</p><p>To try to account for this, I took the proportion of female collaborators each researcher had and divided this by the proportion of female researchers in the panel.</p><p>For example, if 20% of the people I worked with were female and I had received funding from the Mathematics and Information Sciences panel, which has 14% women, I would get a ratio of 1.43 (0.2 / 0.14). This effectively means that I collaborated with 43% more women than expected, given the field I work in.</p><p>Any number below 1 means that this researcher collaborated with fewer women than expected, given the field they work in. Any number greater than 1 means that this researcher has collaborated with more women than expected, given the field they work in.</p><p>To minimise the volatility of this ratio, I decided to only include researchers who had collaborated with 5 people or more over the 10 year period. This left me with 635 researchers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_FPFBcSfmYp5w01HQoUxZg.png" /></figure><p>As you can see, many male researchers have fewer female collaborators than we would expect, with a significant chunk of them having no female collaborators at all. On the other hand, many female researchers have more female collaborators than we would expect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EPS7cYnoJ09LWRjf-eplYw.png" /></figure><p>Calculating the same ratio for male collaborators shows the same thing again. However, we don’t see the same bump of many female researchers having no male collaborators at all.</p><p>We can calculate the median ratio to compare the same thing numerically:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1SMT8mrhgo1Ycjl9RN_PKA.png" /></figure><p>It seems like there is some evidence of gender homophily in science. This is seen most strongly with female collaborators; male researchers have fewer female collaborators than we would expect, while female researchers have more female collaborators than we would expect.</p><p>There are many possible reasons for this homophily. Female researchers may stick together in a male dominated field, or they may not have the same connections to male researchers as their male counterparts.</p><h3><strong>Limitations of the Research</strong></h3><p>This research has many limitations. Perhaps most obviously, people who have been awarded funding from the Marsden fund do not represent their field as a whole. They only provide us with a limited look into collaboration, and there are many collaborations and researchers that we have overlooked in this analysis.</p><p>Secondly, analysing the ratio of actual vs. expected collaborations does not consider why there is a gender imbalance in most fields to begin with. It also does not consider whether there may be more women at lower levels of a particular field which are not funneling through to the highest levels, and why this might be the case.</p><p>In addition, we have only analysed successful Marsden applications. There may be bias in terms of who receives funding that we have not considered.</p><p>Finally, the analysis of actual vs. expected collaborations only includes researchers who have collaborated with 5 or more people. The number of researchers who meet this cut-off is not evenly distributed among fields. For example, Earth Sciences and Astronomy had 203 researchers included in this analysis, while the Humanities only had 3. This means that the results reflect trends in some fields more than others.</p><p><em>Thank you to </em><a href="http://www.tepunahamatatini.ac.nz/"><em>Te Pūnaha Matatini</em></a><em>, Kate Hannah and Dion O’Neale for making this research possible. Thanks also to the Marsden Fund for providing the data.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7dba48f4269" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using SQL in Python: A KiwiSaver Example]]></title>
            <link>https://medium.com/@emmavitz/using-sql-in-python-a-kiwisaver-example-9be64c3f0c72?source=rss-425ae0696b6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9be64c3f0c72</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[housing]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Emma Vitz]]></dc:creator>
            <pubDate>Wed, 28 Feb 2018 08:00:14 GMT</pubDate>
            <atom:updated>2018-02-28T08:00:14.004Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WOCPCDh_hKTfxrlD2PQuxA.jpeg" /></figure><p>I was 13 years old when the retirement savings scheme KiwiSaver was started in New Zealand in 2008. I was working my first job, cleaning rooms at a motel in Nelson on weekends. Retirement seemed like a weird, abstract concept to me, but at the time the government was giving a $1000 “kickstart” if you joined KiwiSaver, and I wasn’t about to say no to free money.</p><p>What I’ve noticed in the ten years since is that people don’t see KiwiSaver as savings for retirement. Not most people my age, anyway.</p><p>They see it as savings to buy their first home. If you’ve been part of KiwiSaver for 3 years, the government allows you to withdraw all but $1000 from your KiwiSaver to buy your first home. That’s what most people I’ve spoken to anecdotally intend to do.</p><p>The housing market in New Zealand is incredibly expensive, and in 2017 <a href="https://www.bloomberg.com/news/articles/2017-05-15/new-zealand-housing-market-most-at-risk-of-bust-goldman-says">was judged the most overvalued in the world by Goldman-Sachs.</a> But not only is owning a home a fundamental part of Kiwi culture, it’s also seen as a rock-solid investment that is all but guaranteed to appreciate in value.</p><p>All this led me to wonder - <strong>what happens when a generation of New Zealander’s puts a large chunk of their retirement savings into an extremely expensive housing market?</strong></p><p>This is, of course, an impossibly difficult question to answer. It depends on the complex interplay of already complex systems like the economy, the housing market, interest rates, immigration and regulation. Nevertheless, I wanted to dig into the available data and see what I could find. You can take a closer look at my code <a href="https://github.com/EmVitz/SQLSaturday/blob/master/SQLSaturday%20-%20SQL%20%26%20Python%20combined.ipynb">here</a>.</p><h3><strong>The Data</strong></h3><p>I started off with tables on KiwiSaver participation and population over time, by demographics such as age and region. I also had tables on how many people withdrew money for KiwiSaver for their first home and for financial hardship, and how much money was withdrawn. The data I had on housing affordability showed the average household income and the average amount spent on housing by broad region. Finally, I had tables on median house prices in New Zealand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DRmX1dgxFTsXTNQbR5Bx6g.png" /></figure><p>As you can see, it is a tangle of tables that are linked by date and a couple of other variables. There’s some interesting data here, but it’s very difficult to see what it shows at this stage. We’ll bring this into Python in a minute, so we can start seeing trends more clearly.</p><h3><strong>Limitations of the Data</strong></h3><p>It’s actually quite difficult to find data on home ownership in New Zealand. Statistics New Zealand does include this in the census, but this only happens once every 5 years, and the 2011 census was delayed by 2 years due to the Canterbury earthquake. Since KiwiSaver has only been around since 2008, this means we only have one years worth of data on home ownership since KiwiSaver was started. This limited the kinds of analyses I was able to do and forced me to use proxy measures like housing affordability instead.</p><p>I was also unable to find much data on how much money people have in their KiwiSaver account. KiwiSaver participation just means that they have an account. This means that someone who is not contributing or is contributing less is not distinguished from someone who is contributing regularly. This is likely to miss some systematic differences, such as the fact that stay-at-home parents (who are disproportionately women) tend to have significantly less money in their accounts.</p><h3><strong>Why use SQL in Python?</strong></h3><p>The advantage of using SQL is that you can easily connect to an existing relational database and pull data together from various tables. You can also filter it and calculate new variables, all in a single query. It’s possible to import the data into Python and do these things without using SQL, but if you’re dealing with a large existing database with many tables (as is often the case when you’re working for an established organisation), using SQL is the way to go.</p><p>Python, of course, lets you do many things that SQL can’t do. Many forms of analysis, prediction and data visualisation can’t be done in SQL. Bringing the capabilities of these two languages together makes things easier and opens up many possibilities.</p><h3><strong>SQL in Python — The Basics</strong></h3><p>To write SQL in Python, you need sqlite3 and create_engine from sqlalchemy. This allows you to create an engine which then connects to the database that you want to query.</p><p>Once the engine has been created and the connection has been made, you can query the database. This is done by writing your SQL query as a string in Python, and then using connection.execute(query).fetchall() to get the results. These can then be turned into a dataframe and used however you like.</p><p>Note that to split your query over multiple lines (which you’ll almost certainly want to do), you need to end each line with a backslash. You’ll also need to put a backslash before any quote marks around a string. This acts as an escape character and means that you can have strings within the string of your query.</p><p>You can also use sqlalchemy, which uses a more Pythonic syntax to write SQL queries. If you have more experience in Python, this may be more intuitive. However, if you’ve got a background in SQL, using sqlite3 is likely to be easier. I’ve done quite a bit of work in SQL before, so I prefer using sqlite3, and that’s what this example uses.</p><h3><strong>Joining Tables that use Different Categories</strong></h3><p>Different tables often use slightly different demographics. For example, the table of KiwiSaver participation by age uses wider age brackets (0–17, 18–24, 25–34, 35–44, 45–54, 55+) than the population by age (0–14, 15–19, 20–24, 25–29, etc).</p><p>If you want to join these tables together, you have to aggregate the narrower age brackets into groups that match the wider age brackets. This can be done using a CASE WHEN statement in your SQL query. This results in less granular detail, but is essential if you want to join tables together on that variable.</p><h3><strong>Using the Retrieved Data in Python</strong></h3><p>Once you’ve retrieved the data from the database, you can use it in Python in any way you choose.</p><p>I decided to create some time series animations using Plotly. I wanted to see if I could create something similar to the <a href="https://plot.ly/python/gapminder-example/">famous gapminder bubble chart</a>. Animations are a good way of communicating change over time to your audience. Plus, people love it when your data visualisation moves!</p><p>Creating an animation in Plotly starts with creating a grid that forms the basis of the visualisation. You then create the figure and add interactive elements such as a slider and play and pause buttons. Next, you make a frame for each part of the animation (for example, each year and age group) before plotting.</p><p>Check out the code to create animations <a href="https://github.com/EmVitz/SQLSaturday/blob/master/SQLSaturday%20-%20SQL%20%26%20Python%20combined.ipynb">here</a>, if you’re interested.</p><h3><strong>So, who is in KiwiSaver?</strong></h3><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fplot.ly%2F%7EEmmaVitz%2F191%2F&amp;src=https%3A%2F%2Fplot.ly%2F%7EEmmaVitz%2F191.embed%3Fautosize%3Dtrue&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=plot" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c67f4f45495307c9b285b4800db0684/href">https://medium.com/media/8c67f4f45495307c9b285b4800db0684/href</a></iframe><p>The animations show that men and women participate in KiwiSaver at very similar rates. However, as I mentioned earlier, this doesn’t necessarily mean that they have similar balances. Previous research has shown that <a href="https://www.stuff.co.nz/business/77538753/womens-kiwisaver-balances-lag-as-gender-pay-gap-widens">women tend to have significantly less in retirement savings than men</a>, but this is beyond the data I’ve used in this example.</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fplot.ly%2F%7EEmmaVitz%2F188%2F&amp;src=https%3A%2F%2Fplot.ly%2F%7EEmmaVitz%2F188.embed%3Fautosize%3Dtrue&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=plot" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b2af28aafd7c459138f67ac309438a1/href">https://medium.com/media/3b2af28aafd7c459138f67ac309438a1/href</a></iframe><p>KiwiSaver participation is highest for those aged 25–34, and lowest for those 55 or older. This makes sense; those 25 to 34 year olds would have been between 15 and 24 when the scheme was introduced, and are likely to have been enrolled with their first job (KiwiSaver is an opt-out scheme, which means you are automatically enrolled unless you decide not to be). Many of those older than 55 may have already had some form of retirement savings when KiwiSaver started, and may therefore have chosen to opt out.</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fplot.ly%2F%7EEmmaVitz%2F162%2F&amp;src=https%3A%2F%2Fplot.ly%2F%7EEmmaVitz%2F162.embed%3Fautosize%3Dtrue&amp;type=text%2Fhtml&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;schema=plot" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/683f47527377ed4f0be051eee4749e73/href">https://medium.com/media/683f47527377ed4f0be051eee4749e73/href</a></iframe><p>Wellington is the region with the highest levels of KiwiSaver participation. Wellington is a relatively wealthy region, with <a href="https://www.nbr.co.nz/opinion/regional-gdp-fastest-growing-wealthiest-capita">the second highest regional GDP per capita</a> in the country. It also has a large number of young people, with the <a href="https://wellington.govt.nz/~/media/about-wellington/profile/files/wellington-city-profile.pdf">median age in Wellington</a> being 34, three years younger than the national median of 37. These factors are likely to contribute to the high KiwiSaver participation rates.</p><p>Meanwhile, Northland is the region with the lowest KiwiSaver participation rates. This is likely to be because Northland has the <a href="https://www.nbr.co.nz/opinion/regional-gdp-fastest-growing-wealthiest-capita">lowest regional GDP per capita</a> in New Zealand. On top of that, the <a href="https://www.parliament.nz/en/mps-and-electorates/electorate-profiles/electorate-profiles-data/document/DBHOH_Lib_EP_Northland_People/northland-people">median age in Northland</a> is 43, six years older than the national median of 37. Together, low incomes and an older population are likely to contribute to fewer people in Northland being part of KiwiSaver.</p><h3><strong>What do we know about KiwiSaver and buying a first home?</strong></h3><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fplot.ly%2F%7EEmmaVitz%2F164%2F&amp;src=https%3A%2F%2Fplot.ly%2F%7EEmmaVitz%2F164.embed%3Fautosize%3Dtrue&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=plot" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/6b7472e4196c334dc770ce142dbefe71/href">https://medium.com/media/6b7472e4196c334dc770ce142dbefe71/href</a></iframe><p>The mean amount withdrawn from KiwiSaver to buy a first home peaked in 2016 at $18,630. Meanwhile, median house prices in New Zealand have increased every year since KiwiSaver began in 2008. In 2017, the median house price was $530,000. It will be interesting to see whether this continues to rise, or whether house prices peak shortly after the amount withdrawn from KiwiSaver peaked in 2016, as <a href="https://www.stuff.co.nz/business/industries/80066702/NZ-house-prices-to-drop-in-real-terms-from-2018-as-borrow-and-spend-cycle-burns-out-Westpac">some have predicted</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fplot.ly%2F%7EEmmaVitz%2F167%2F&amp;src=https%3A%2F%2Fplot.ly%2F%7EEmmaVitz%2F167.embed%3Fautosize%3Dtrue&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=plot" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/6cf140d8bc0a5eaa63ab40c687aaab0b/href">https://medium.com/media/6cf140d8bc0a5eaa63ab40c687aaab0b/href</a></iframe><p>The relationship between mean annual salary and mean annual housing costs appears to be very linear.</p><p>One thing to consider here is that the mean, unlike the median, is affected by outliers. This is more likely to affect the statistics on income than housing costs.</p><p>Income tends to be skewed to the right, with most people earning a moderate amount, and a few people earning very large amounts of money.</p><p>Housing costs will also have variation, but this is likely to be less extreme in its skew. There will be a few people in New Zealand who earn 50 times as much as others (for example, $1 million vs. $20,000), but it’s unlikely that there are many people who spend 50 times as much as others on housing. Therefore comparing the mean income to the mean housing costs may artificially inflate the statistics on income more so than the statistics on housing.</p><h3><strong>To conclude…</strong></h3><p>Will our generation regret trading in a big chunk of our retirement savings for a massive mortgage? Will housing prices continue to skyrocket, making us glad we got into the property market when we did?</p><p>I don’t know. But I do find it fascinating.</p><p>KiwiSaver is still in its infancy, and that means we don’t have huge amounts of data on how it affects and is affected by the housing market. These analyses have largely been descriptive in nature (mostly because of the lack of available data), and ideally I’d like to do some more predictive stuff in the future. In the meantime, I’ll be watching KiwiSaver and the housing market with interest.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9be64c3f0c72" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>