<?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: SAS splitting in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SAS-splitting/m-p/511100#M2107</link>
    <description>&lt;P&gt;Since this seems like a homework assignment, I will outline the method, but I'm not going to write the code for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Every observation goes in one data set, with a flag like you have called SELECTED&lt;/LI&gt;
&lt;LI&gt;Create a new Y variable called Y2 that is identical to Y, except when SELECTED=0&amp;nbsp;then Y2 is missing&lt;/LI&gt;
&lt;LI&gt;Fit the model to Y2 and obtain predicted values&lt;/LI&gt;
&lt;LI&gt;Compare the predicted values to Y (not Y2) and compute residuals and other summary statistics for training and validation.&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Wed, 07 Nov 2018 18:20:56 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-11-07T18:20:56Z</dc:date>
    <item>
      <title>SAS splitting</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-splitting/m-p/511096#M2106</link>
      <description>&lt;P&gt;I write this code below to solve this problem but the code doesn't&amp;nbsp;work. Is there anyone can help with that&lt;/P&gt;&lt;P&gt;Consider the gasoline mileage data. Split the data into estimation and prediction sets.&lt;BR /&gt;a. Evaluate the statistical properties of these data sets.&lt;BR /&gt;b. Fit a model involving x 1 and x 6 to the estimation data. Do the coefficients and fitted values from this model seem reasonable?&lt;BR /&gt;c. Use this model to predict the observations in the prediction data set. What is your evaluation of this model’ s predictive performance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Title1 'problem 2’;&lt;BR /&gt;data math;&lt;BR /&gt;input x1 x2 x3 x4 x5 x6 x7 x8 x9 y;&lt;BR /&gt;cards;&lt;BR /&gt;&lt;BR /&gt;350 170 275 8.5 2.56 199.6 72.9 3860 1 17&lt;BR /&gt;250 105 185 8.25 2.73 196.7 72.2 3510 1 20&lt;BR /&gt;351 143 255 8 3 199.9 74 3890 1 18.25&lt;BR /&gt;231 110 175 8 2.56 179.3 65.4 3020 1 22.12&lt;BR /&gt;262 110 200 8.5 2.56 179.3 65.4 3180 1 21.47&lt;BR /&gt;89.7 70 81 8.2 3.9 155.7 64 1905 0 34.7&lt;BR /&gt;96.9 75 83 9 4.3 165.2 65 2320 0 30.4&lt;BR /&gt;350 155 250 8.5 3.08 195.4 74.4 3885 1 16.5&lt;BR /&gt;85.3 80 83 8.5 3.89 160.6 62.2 2009 0 36.5&lt;BR /&gt;171 109 146 8.2 3.22 170.4 66.9 2655 0 21.5&lt;BR /&gt;258 110 195 8 3.08 171.5 77 3375 1 19.7&lt;BR /&gt;140 83 109 8.4 3.4 168.8 69.4 2700 0 20.3&lt;BR /&gt;302 129 220 8 3 199.9 74 3890 1 17.8&lt;BR /&gt;500 190 360 8.5 2.73 224.1 79.8 5290 1 14.39&lt;BR /&gt;440 215 330 8.2 2.71 231 79.7 5185 1 14.89&lt;BR /&gt;350 155 250 8.5 3.08 196.7 72.2 3910 1 17.8&lt;BR /&gt;318 145 255 8.5 2.45 197.6 71 3660 1 16.41&lt;BR /&gt;231 110 175 8 2.56 179.3 65.4 3050 1 23.54&lt;BR /&gt;360 180 290 8.4 2.45 214.2 76.3 4250 1 21.47&lt;BR /&gt;96.9 75 83 9 4.3 165.2 61.8 2275 0 31.9&lt;BR /&gt;460 223 366 8 3 228 79.8 5430 1 13.27&lt;BR /&gt;133.6 96 120 8.4 3.91 171.5 63.4 2535 0 23.9&lt;BR /&gt;318 140 255 8.5 2.71 215.3 76.3 4370 1 19.73&lt;BR /&gt;351 148 243 8 3.25 215.5 78.5 4540 1 13.9&lt;BR /&gt;351 148 243 8 3.26 216.1 78.5 4715 1 13.27&lt;BR /&gt;360 195 295 8.25 3.15 209.3 77.4 4215 1 13.77&lt;BR /&gt;360 165 255 8.5 2.73 185.2 69 3660 1 16.5&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc surveyselect data=math outall out=split&lt;BR /&gt;samprate=0.7 seed=90284098 method=SRS;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc freq data=split;&lt;BR /&gt;table selected;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data estimation prediction;&lt;BR /&gt;set split;&lt;BR /&gt;if selected=1 then output estimation;&lt;BR /&gt;else output prediction;&lt;BR /&gt;drop selected;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc reg data=estimation;&lt;BR /&gt;model y=x1x6;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 17:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-splitting/m-p/511096#M2106</guid>
      <dc:creator>esraa</dc:creator>
      <dc:date>2018-11-07T17:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS splitting</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-splitting/m-p/511100#M2107</link>
      <description>&lt;P&gt;Since this seems like a homework assignment, I will outline the method, but I'm not going to write the code for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Every observation goes in one data set, with a flag like you have called SELECTED&lt;/LI&gt;
&lt;LI&gt;Create a new Y variable called Y2 that is identical to Y, except when SELECTED=0&amp;nbsp;then Y2 is missing&lt;/LI&gt;
&lt;LI&gt;Fit the model to Y2 and obtain predicted values&lt;/LI&gt;
&lt;LI&gt;Compare the predicted values to Y (not Y2) and compute residuals and other summary statistics for training and validation.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 07 Nov 2018 18:20:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-splitting/m-p/511100#M2107</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-11-07T18:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS splitting</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-splitting/m-p/511234#M2141</link>
      <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 23:05:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-splitting/m-p/511234#M2141</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-11-07T23:05:28Z</dc:date>
    </item>
  </channel>
</rss>

