<?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 Re: comparing pre and post data from multiple choice question in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790612#M374</link>
    <description>&lt;P&gt;If that second photograph is how EXCEL shows your spreadsheet then the reason the variable is CHARACTER in SAS is because you made it character in EXCEL.&amp;nbsp; That is what the little green triangles mean.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jan 2022 01:44:03 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-01-18T01:44:03Z</dc:date>
    <item>
      <title>comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790056#M351</link>
      <description>&lt;P&gt;Hello, I have a question&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have data from a survey... it was knowledge based... and there is pre and post data.&lt;/P&gt;&lt;P&gt;it is a multiple choice questions, with 4 answers and only one is correct.&lt;/P&gt;&lt;P&gt;how can i run a t test with this data?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 19:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790056#M351</guid>
      <dc:creator>ecampos2</dc:creator>
      <dc:date>2022-01-13T19:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790060#M352</link>
      <description>What is the hypothesis? &lt;BR /&gt;What specifically do you need to know how to do?&lt;BR /&gt;Have you imported your data from Excel? Do you know how to structure your data for SAS to do a TTEST? Which procedure to use?&lt;BR /&gt;&lt;BR /&gt;It seems like you would need a paired t-test so this example seems like it aligns with your question:&lt;BR /&gt;&lt;A href="https://libguides.library.kent.edu/SAS/PairedSamplestTest" target="_blank"&gt;https://libguides.library.kent.edu/SAS/PairedSamplestTest&lt;/A&gt;</description>
      <pubDate>Thu, 13 Jan 2022 19:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790060#M352</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-13T19:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790061#M353</link>
      <description>FYI - I looked at your data briefly, it appears to be categorical/quantitative so are you sure a T-Test is what you want? Again, what is the hypothesis?</description>
      <pubDate>Thu, 13 Jan 2022 19:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790061#M353</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-13T19:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790088#M357</link>
      <description>&lt;P&gt;the hypothesis changes for each question, for example question 1 was which food raised blood sugar&amp;nbsp; levels the most... in that case answers were given (the right answer is 1 small apple) and we are comparing the increase in wright answers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question 2 is what non-starchy vegetables are how much of your plate? with the correct answer being 1/2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 00:29:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790088#M357</guid>
      <dc:creator>ecampos2</dc:creator>
      <dc:date>2022-01-14T00:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790091#M358</link>
      <description>&lt;P&gt;Then first convert your data to numeric values that can be analyzed. &lt;BR /&gt;&lt;BR /&gt;I'm assuming the overall question then is how many people get the answers correct before and after? So the hypothesis is actually the same across all questions if you generalize it a bit more with each question being different. &lt;BR /&gt;&lt;BR /&gt;I would probably restructure my data to be something like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;User Question PreAnswerCorrect PostAnswerCorrect
1 1 1 1
1 2 0 1
1 3 0 1
1 4 1 1
2 1 1 1
2 2 1 0
2 3 0 0
2 4 1 0
&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Then you can use PROC TTEST as in the example above:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data = have;
by question;

proc ttest data = have;
by Question;
paired PreAnswerCorrect * PostAnswerCorrect;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/412642"&gt;@ecampos2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;the hypothesis changes for each question, for example question 1 was which food raised blood sugar&amp;nbsp; levels the most... in that case answers were given (the right answer is 1 small apple) and we are comparing the increase in wright answers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question 2 is what non-starchy vegetables are how much of your plate? with the correct answer being 1/2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 00:56:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790091#M358</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-14T00:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790095#M359</link>
      <description>&lt;P&gt;thank you much....the data you provided had 4 rows.... wouldn't it only have 2 one for pre and one for post?&lt;/P&gt;&lt;P&gt;I tried to do what you suggested and for wrong answers i put 0 and right answers i put 1.... did we need to analyze each possible answer that was given?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;pre	post 
0	1
1	1
1	1
1	1
1	1
0	1
1	1
0	1
0	0
1	1
1	1
1	1
0	0
1	1
1	1
1	1
1	1
1	1
0	0
1	1
0	0
1	1
0	0
1	1
0	0
0	0
1	0
0	1
0	0
1	1
0	0
0	1
0	0
0	1
1	1
1	1
1	1
1	1
1	0
1	1
0	0&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Jan 2022 01:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790095#M359</guid>
      <dc:creator>ecampos2</dc:creator>
      <dc:date>2022-01-14T01:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790123#M360</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/412642"&gt;@ecampos2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;thank you much....the data you provided had 4 rows.... wouldn't it only have 2 one for pre and one for post?&lt;/P&gt;
&lt;P&gt;I tried to do what you suggested and for wrong answers i put 0 and right answers i put 1.... did we need to analyze each possible answer that was given?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;pre	post 
0	1
1	1
1	1
1	1
1	1
0	1
1	1
0	1
0	0
1	1
1	1
1	1
0	0
1	1
1	1
1	1
1	1
1	1
0	0
1	1
0	0
1	1
0	0
1	1
0	0
0	0
1	0
0	1
0	0
1	1
0	0
0	1
0	0
0	1
1	1
1	1
1	1
1	1
1	0
1	1
0	0&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This doesn't indicate which subject is being evaluated, and it doesn't indicate what question was correct, or not. So I like the data layout from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please don't tell us what you tried doesn't work and provide no other information, because we don't know what you tried. Show us the code you tried, and the result.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 11:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790123#M360</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-14T11:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790166#M362</link>
      <description>&lt;P&gt;No, it would not have just two.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume you measured pre and post on the same person by the way. How would you identify which record goes with which person? That's why you need the ID.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then adding Question in allows you to do all questions at once by adding in the BY QUESTION portion. Those are the two additional variables that make this easier to analyze.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you absolutely require them? No. Will they make your life easier and help make sure you don't mistakes? Yes. Do they make the work easier? Yes. Otherwise, how will you tell each data set apart for each question? You'll have 4 data sets (1 for each question instead) and 4 sets of code. If you need to change something one place you'll now have to change it in 4 places.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;did we need to analyze each possible answer that was given?&amp;nbsp;did we need to analyze each possible answer that was given?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depends on if you want to include that data in your analysis. If you do, then yes. You can do that using a program though, not manually.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 16:01:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790166#M362</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-14T16:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790179#M363</link>
      <description>&lt;P&gt;Thank everyone so much!&lt;/P&gt;&lt;P&gt;For some reason Im still not getting a t- test.&amp;nbsp; I'm getting this error on SAS:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;ERROR: Variable pre in list does not match type prescribed for this list.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;I really don't understand how does sas knows what question is right or wrong?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;I also changed the data format to what rezza suggested. I row patient id, 1 row question number, and pre and post response. I imported the doc i attached (question 1 pre) and then put the code you suggested&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sort data = work.import;
by question;

proc ttest data = work.import;
by Question;
paired pre*post;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Jan 2022 16:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790179#M363</guid>
      <dc:creator>ecampos2</dc:creator>
      <dc:date>2022-01-14T16:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790186#M364</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/412642"&gt;@ecampos2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank everyone so much!&lt;/P&gt;
&lt;P&gt;For some reason Im still not getting a t- test.&amp;nbsp; I'm getting this error on SAS:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;ERROR: Variable pre in list does not match type prescribed for this list.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Usually this means a variable is character when it should be numeric.&lt;/P&gt;
&lt;P&gt;From your file attached, I'm guessing PRE is a character variable when it should be numeric (based on alignment, just a guess).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;I really don't understand how does sas knows what question is right or wrong?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Didn't you code the data as 1 being correct, 0 being wrong?&lt;/P&gt;
&lt;P&gt;Otherwise how did you code your 0/1 in the data shown?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 16:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790186#M364</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-14T16:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790190#M365</link>
      <description>&lt;P&gt;Yes so the question on the survey was a knowledge based question, "Which food raised blood sugar level the most?". There was 4 possible answers 1/3 cheddar cheese, 1 oz pork bacon, 3 oz hamburger patty, and 1 small apple. (The correct answer was 1 small apple)&lt;/P&gt;&lt;P&gt;I put 0 for people who answered&amp;nbsp;&amp;nbsp;1/3 cheddar cheese, 1 oz pork bacon, or 3 oz hamburger patty, and 1 for people who answered the correct answer; 1 small apple.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 17:02:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790190#M365</guid>
      <dc:creator>ecampos2</dc:creator>
      <dc:date>2022-01-14T17:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790192#M366</link>
      <description>&lt;P&gt;Also how could i change my pre to be a character not numeric?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 17:17:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790192#M366</guid>
      <dc:creator>ecampos2</dc:creator>
      <dc:date>2022-01-14T17:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790203#M367</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/412642"&gt;@ecampos2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Also how could i change my pre to be a character not numeric?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You want numeric, not character.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Go back and fix how you calculated it. Show that code and we can help you fix it. If you put the 0/1 in quotes that's one way to have created them as character.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/412642"&gt;@ecampos2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Also how could i change my pre to be a character not numeric?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 18:10:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790203#M367</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-14T18:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790336#M368</link>
      <description>&lt;P&gt;okay i have attached the data in the format you recommended (question 1 pre.xlsx).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I first imported the doc in sas.&amp;nbsp;&lt;/P&gt;&lt;P&gt;once downloaded my sas code was:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROC TTEST DATA=work.import ALPHA=.05;
    PAIRED pre*post;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Then it gives me the error:&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;ERROR: Variable pre in list does not match type prescribed for this list.&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jan 2022 16:38:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790336#M368</guid>
      <dc:creator>ecampos2</dc:creator>
      <dc:date>2022-01-15T16:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790340#M369</link>
      <description>Same as the previous error, so my answer is pretty much the same. Show all of your code. The import, where you import the data, where you recode the data to 0/1 or recode pre/post to 0/1. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 15 Jan 2022 18:42:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790340#M369</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-15T18:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790357#M370</link>
      <description>&lt;P&gt;Most of us will not download XLSX (or other Microsoft Office) attachments, as they can be a security threat. The proper format to provide data is via SAS data step code (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;instructions&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jan 2022 20:46:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790357#M370</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-15T20:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790610#M373</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-01-17 at 8.01.01 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67478i19B171F08D18B6E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-01-17 at 8.01.01 PM.png" alt="Screen Shot 2022-01-17 at 8.01.01 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-01-17 at 8.00.24 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67477iABB10142D9DC3474/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-01-17 at 8.00.24 PM.png" alt="Screen Shot 2022-01-17 at 8.00.24 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;okay the first image with the writing is the original from the survey. There were 4 possible answers, the right answer being:1 small apple.&lt;/P&gt;&lt;P&gt;I did what you recommended, and recoded it to what the second image is and if somebody answered wrong it would be 0 and if it was right, they got a 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In sas i imported the data. and then put the code listed above.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROC TTEST DATA=work.import ALPHA=.05;
    PAIRED pre*post;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 01:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790610#M373</guid>
      <dc:creator>ecampos2</dc:creator>
      <dc:date>2022-01-18T01:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790612#M374</link>
      <description>&lt;P&gt;If that second photograph is how EXCEL shows your spreadsheet then the reason the variable is CHARACTER in SAS is because you made it character in EXCEL.&amp;nbsp; That is what the little green triangles mean.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 01:44:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790612#M374</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-18T01:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790696#M376</link>
      <description>&lt;P&gt;Typically what would happen is you import the raw data, you do not recode it manually. This is actually important as it allows for full scientific reproducibility and is an important part of the scientific process. Papers these days have been retracted because someone coded things as 1 or 0 and then someone else flipped that coding. Doing things manually is not the correct approach. &lt;BR /&gt;&lt;BR /&gt;I would expect to see code that looks like the following:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*import raw data;
proc import datafile='myExcel.xlsx' out=rawData dbms=XLSX replace;run;

*clean up data;
data cleanData;
set rawData;
if Q3 in ('1 small apple') then Q3_Code = 1;
else Q3_Code=0;
/*rest of data cleaning required*/

run;

*Wrangle into format for pre-post, not sure because you have shown only the pre file;
data clean_long_data;
set cleanData;
/*merge cleanDatapre cleandatapost;*/
run;

*T-Test;
proc ttest data=clean_long_data;
....
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;So far all you've shown is the first step. Which is the last step in what you need. Somewhere in that code above is where you would apply your fix for the data types.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 15:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790696#M376</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-18T15:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: comparing pre and post data from multiple choice question</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790958#M379</link>
      <description>&lt;P&gt;Can you state your null hypothesis &amp;amp; alternative hypothesis precisely?&amp;nbsp; Do you really want to have a test for each question or do you want to examine whether the % of correct answers across all respondents &amp;amp; all questions increased in the post survey?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even though you can code responses as numeric (0 = incorrect, 1 = correct) for pre &amp;amp; post survey, you are really working with a categorical variable at the individual &amp;amp; question level.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may find that a chi-sq test is more appropriate if examining each question with the cohorts being correct responders &amp;amp; incorrect responders on pre-test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are evaluating the effectiveness of the intervention across all questions, you could measure the difference in pre &amp;amp; post test scores.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp;Pre-score&amp;nbsp; Post-score&amp;nbsp; &amp;nbsp;Diff&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;75%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;85%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +10%&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;50%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;65%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +15%&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, clearly stating your hypothesis would be very helpful&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 17:05:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/comparing-pre-and-post-data-from-multiple-choice-question/m-p/790958#M379</guid>
      <dc:creator>tom_grant</dc:creator>
      <dc:date>2022-01-19T17:05:35Z</dc:date>
    </item>
  </channel>
</rss>

