<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I calculate change in survey response between different survey years? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-calculate-change-in-survey-response-between-different/m-p/510028#M26139</link>
    <description>&lt;P&gt;I am new to analyzing survey data so would very much appreciate some help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working with survey data (SAS 9.4)&amp;nbsp;that is in three different SAS data sets. The data sets are from when the survey was administered in 2012, 2015, and 2018 to different schools. One of the schools wants to look at trends in the data for students at their school for certain questions. I want to know how to calculate whether the change in responses to these questions are statistically significant from year to year. For example, I have one question (the variable is q43)&amp;nbsp;that has four different response options:&lt;/P&gt;&lt;P&gt;1=Strongly agree&lt;/P&gt;&lt;P&gt;2=Agree&lt;/P&gt;&lt;P&gt;3=Disagree&lt;/P&gt;&lt;P&gt;4=Strongly disagree&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get the freq table for one year my code looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;surveyfreq&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=2015dataset;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;tables&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; q43 / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;row&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;cl&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;cv&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; District=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;weight&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Weight;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I calculate whether the change in response to this question differs significantly by year? Also, the data sets are weighted, but every student took the survey at this particular high school so they all have a weight of 1.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Nov 2018 19:32:31 GMT</pubDate>
    <dc:creator>elizabethanalys</dc:creator>
    <dc:date>2018-11-02T19:32:31Z</dc:date>
    <item>
      <title>How do I calculate change in survey response between different survey years?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-calculate-change-in-survey-response-between-different/m-p/510028#M26139</link>
      <description>&lt;P&gt;I am new to analyzing survey data so would very much appreciate some help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working with survey data (SAS 9.4)&amp;nbsp;that is in three different SAS data sets. The data sets are from when the survey was administered in 2012, 2015, and 2018 to different schools. One of the schools wants to look at trends in the data for students at their school for certain questions. I want to know how to calculate whether the change in responses to these questions are statistically significant from year to year. For example, I have one question (the variable is q43)&amp;nbsp;that has four different response options:&lt;/P&gt;&lt;P&gt;1=Strongly agree&lt;/P&gt;&lt;P&gt;2=Agree&lt;/P&gt;&lt;P&gt;3=Disagree&lt;/P&gt;&lt;P&gt;4=Strongly disagree&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get the freq table for one year my code looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;surveyfreq&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=2015dataset;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;tables&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; q43 / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;row&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;cl&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;cv&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; District=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;weight&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Weight;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I calculate whether the change in response to this question differs significantly by year? Also, the data sets are weighted, but every student took the survey at this particular high school so they all have a weight of 1.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 19:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-calculate-change-in-survey-response-between-different/m-p/510028#M26139</guid>
      <dc:creator>elizabethanalys</dc:creator>
      <dc:date>2018-11-02T19:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I calculate change in survey response between different survey years?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-calculate-change-in-survey-response-between-different/m-p/510675#M26148</link>
      <description>&lt;P&gt;A good&amp;nbsp;first step would be to combine all 3 years into 1 dataset. You could do this using the (in=) dataset option.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data all_years;
   set survey2012(in=s12) survey2015(in=s15) survey2018(in=s18);

   if s12 then year = 2012;
   if s15 then year = 2015;
   if s18 then year = 2018;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because you have discrete responses (1, 2, 3, or 4), comparing the medians of the groups rather than means might be a good option. A Kruskal Wallis test would achieve this and can be done in SAS using proc npar1way. In your case, the variable after "class" is the grouping variable (the year of the survey). The variable after "var" is the variable we want to compare across years (score).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc npar1way data=all_years;
   class year;
   var score;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;More info on using the npar1way procedure can be found &lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_npar1way_sect002.htm" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 03:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-calculate-change-in-survey-response-between-different/m-p/510675#M26148</guid>
      <dc:creator>Anthony45</dc:creator>
      <dc:date>2018-11-06T03:33:59Z</dc:date>
    </item>
  </channel>
</rss>

