<?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: How to do a trend or regression analysis if mean and standard deviation values are known in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154345#M8075</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the update. I'll play around with the data today!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Nov 2014 07:51:11 GMT</pubDate>
    <dc:creator>buekie</dc:creator>
    <dc:date>2014-11-04T07:51:11Z</dc:date>
    <item>
      <title>How to do a trend or regression analysis if mean and standard deviation values are known</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154337#M8067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to do a trend or a regression analysis. Following data is known:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; average&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; standard deviation&lt;/P&gt;&lt;P&gt;1996&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;1997&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 210&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P&gt;1998&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 220&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm familiar with the normal proc reg analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I want to do now is to see if there is a significant trend but first I do not know how to read in these data (average, standard deviation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 13:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154337#M8067</guid>
      <dc:creator>buekie</dc:creator>
      <dc:date>2014-11-03T13:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a trend or regression analysis if mean and standard deviation values are known</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154338#M8068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ordinary least squares, as performed by PROC REG, will still provide you with the least squares estimate of the slope and intercept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The t-tests and F-tests will not be correct, as they apply only to the case where the errors are i.i.d. normally distributed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know the standard deviation of each data point, then you could use a weighted least squares to obtain statistical tests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, when you say average of 200 and standard deviation of 10, what is this the average and standard deviation of?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 14:03:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154338#M8068</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2014-11-03T14:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a trend or regression analysis if mean and standard deviation values are known</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154339#M8069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the quick answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was just a hypothetical example. Goal is to analyse the trend analysis of air quality impact (expressed in disability adjusted life years or DALYs).&lt;/P&gt;&lt;P&gt;I'm familiar with the PROC REG procedure which I used many years ago for my PhD but in that time we always started from the raw data.&lt;/P&gt;&lt;P&gt;Now I only have the average and the standard deviation. How do you put in into SAS?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 14:53:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154339#M8069</guid>
      <dc:creator>buekie</dc:creator>
      <dc:date>2014-11-03T14:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a trend or regression analysis if mean and standard deviation values are known</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154340#M8070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this (untested code) working from your example:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data have;&lt;/P&gt;&lt;P&gt;input year&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; average&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; standard_deviation;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1996&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/P&gt;&lt;P&gt;1997&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 210&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P&gt;1998&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 220&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;wt = 1/(standard_deviation;*standard_deviation); /* Makes the weight proportional to the reciprocal of variance, so the estimates are BLUE */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc reg data=want;&lt;/P&gt;&lt;P&gt;model average=year;&lt;/P&gt;&lt;P&gt;weight=wt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 15:03:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154340#M8070</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-11-03T15:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a trend or regression analysis if mean and standard deviation values are known</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154341#M8071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One correction to Steve's suggested code: in the weight statement, change the '=' sign to a space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a more brute force solution that will provide the same parameter estimates, but also provide possibly more meaningful numbers for the various other results output;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input year average sd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1996 200 10&lt;/P&gt;&lt;P&gt;1997 210 15&lt;/P&gt;&lt;P&gt;1998 220 15&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data base;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input score;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;8&lt;/P&gt;&lt;P&gt;9&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename doit temp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; file doit;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; stmt=catx(' ','proc standard data=base mean=',average,' std=',sd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' out=stndized;run;');&lt;/P&gt;&lt;P&gt;&amp;nbsp; put stmt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; stmt=catx(' ','data stndized; retain year',year,'; set stndized;run;');&lt;/P&gt;&lt;P&gt;&amp;nbsp; put stmt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; stmt=catt('proc append base=want data=stndized;run;');&lt;/P&gt;&lt;P&gt;&amp;nbsp; put stmt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include doit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc reg data=want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; model score=year;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 15:16:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154341#M8071</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-11-03T15:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a trend or regression analysis if mean and standard deviation values are known</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154342#M8072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Art.&amp;nbsp; I should just put the hex on cut and paste...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 15:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154342#M8072</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-11-03T15:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a trend or regression analysis if mean and standard deviation values are known</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154343#M8073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;It was just a hypothetical example. Goal is to analyse the trend analysis of air quality impact (expressed in disability adjusted life years or DALYs).&lt;/P&gt;
&lt;P&gt;I'm familiar with the PROC REG procedure which I used many years ago for my PhD but in that time we always started from the raw data&lt;/P&gt;




&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not convinced that this standard deviation that you are describing is meaningful here (or perhaps it is indeed meaningful, but in ways that are not what you are implying).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The condition needed to generate valid t-tests and F-tests is that the ERRORs around the regression line are independent and identically distributed as a normal distribution. The condition has NOTHING to do with the standard deviation of the air quality impact numbers during the year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, I'm also skeptical that the weighted regression is appropriate here, and so I would not (yet) recommend using the code above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, I would advise fitting the regression to the averages (ignoring the standard deviations), and then plotting the residuals in any one of a number of ways to see if they are normally distributed, and to see if they (somewhat) systematically get larger or smaller as the average increases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, it may be true that a weighted regression is needed, because the ERRORs are not i.i.d. normal, but nowhere has that claim been made or implied.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 15:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154343#M8073</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2014-11-03T15:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a trend or regression analysis if mean and standard deviation values are known</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154344#M8074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may be able to adapt this one-way ANOVA example to your application.&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/25/020.html" title="http://support.sas.com/kb/25/020.html"&gt;25020 - One-way ANOVA on summary data&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 18:02:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154344#M8074</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-11-03T18:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a trend or regression analysis if mean and standard deviation values are known</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154345#M8075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the update. I'll play around with the data today!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 07:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-do-a-trend-or-regression-analysis-if-mean-and-standard/m-p/154345#M8075</guid>
      <dc:creator>buekie</dc:creator>
      <dc:date>2014-11-04T07:51:11Z</dc:date>
    </item>
  </channel>
</rss>

