<?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: Specify slope in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59698#M2771</link>
    <description>I finally got around to trying the code and it worked really well for my requirement.&lt;BR /&gt;
Thanks to both of you for the suggestions. the code that I used was the first one that Steve suggested - proc glm modeling the difference.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the help!</description>
    <pubDate>Thu, 16 Sep 2010 18:57:30 GMT</pubDate>
    <dc:creator>SAS_User</dc:creator>
    <dc:date>2010-09-16T18:57:30Z</dc:date>
    <item>
      <title>Specify slope</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59692#M2765</link>
      <description>I would like to specify a value of '1' to my slope and estimate the intercept. Is there a way to do that in proc GLM or another proc?&lt;BR /&gt;
Thanks</description>
      <pubDate>Mon, 02 Aug 2010 22:52:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59692#M2765</guid>
      <dc:creator>SAS_User</dc:creator>
      <dc:date>2010-08-02T22:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Specify slope</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59693#M2766</link>
      <description>I suppose that you currently have something like:&lt;BR /&gt;
&lt;BR /&gt;
proc glm data=one;&lt;BR /&gt;
model y=x;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
if so, then try:&lt;BR /&gt;
&lt;BR /&gt;
data two;&lt;BR /&gt;
set one;&lt;BR /&gt;
diff=y-x;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc glm data=two;&lt;BR /&gt;
model diff=;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
The standard error of the estimate will be slightly biased, but the point estimate should be OK.&lt;BR /&gt;
&lt;BR /&gt;
Steve Denham</description>
      <pubDate>Tue, 03 Aug 2010 11:25:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59693#M2766</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2010-08-03T11:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Specify slope</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59694#M2767</link>
      <description>Many of the SAS procedures which allow you to fit a regression model allow specification of an "offset" parameter.  The GLM procedure is one of the procedures which allow specification of an offset parameter.  When you specify that a variable is an offset parameter, then that variable enters the right hand side of the model with slope coefficient fixed at 1.&lt;BR /&gt;
&lt;BR /&gt;
With the GLM procedure, code for fitting a regression model including an offset parameter would be something like the following:&lt;BR /&gt;
&lt;BR /&gt;
proc glm data=mydata;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;class x1 x2;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;model y = x1 x2 x3 / offset=z s;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
In the above code, there is a variable Z which is to have a slope coefficient of 1.  It should be pointed out that you can only name one variable as being an offset parameter.  The documentation for the GLM procedure also states that "This variable cannot be a CLASS variable, and it cannot be the response variable or one of the explanatory variables."  Only a moments thought would prove that all of these conditions make sense.</description>
      <pubDate>Tue, 03 Aug 2010 18:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59694#M2767</guid>
      <dc:creator>Dale</dc:creator>
      <dc:date>2010-08-03T18:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Specify slope</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59695#M2768</link>
      <description>Dale,&lt;BR /&gt;
&lt;BR /&gt;
Did you mean GLIMMIX, rather than GLM?  I got sensible answers from GLIMMIX, but only error messages from GLM.  Maybe I missed something in the syntax.&lt;BR /&gt;
&lt;BR /&gt;
Steve Denham</description>
      <pubDate>Wed, 04 Aug 2010 11:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59695#M2768</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2010-08-04T11:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Specify slope</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59696#M2769</link>
      <description>Thank you all so much for you responses. I have not  had a chance to try any of your suggestions yet but will do so soon and let you know. Thanks again for the help.</description>
      <pubDate>Wed, 04 Aug 2010 16:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59696#M2769</guid>
      <dc:creator>SAS_User</dc:creator>
      <dc:date>2010-08-04T16:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Specify slope</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59697#M2770</link>
      <description>Steve,&lt;BR /&gt;
&lt;BR /&gt;
I think that I must have clicked on the GENMOD procedure rather than the GLM procedure in the SAS documentation.  I thought it was a bit odd that there would be an OFFSET parameter in GLM.  I should have double-checked.  The GLIMMIX procedure also supports an OFFSET parameter specification.  However, not everyone has GLIMMIX installed.&lt;BR /&gt;
&lt;BR /&gt;
If GLIMMIX is available, the code which I showed previously would work directly with only a change of the procedure name from GLM to GLIMMIX.  If GLIMMIX is not available and GENMOD is employed, then one would need to remove the option S from the model statement.&lt;BR /&gt;
&lt;BR /&gt;
Thus, we would write either:&lt;BR /&gt;
&lt;BR /&gt;
proc glimmix data=mydata;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;class x1 x2;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;model y = x1 x2 x3 / offset=z s;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
or&lt;BR /&gt;
&lt;BR /&gt;
proc genmod data=mydata;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;class x1 x2;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;model y = x1 x2 x3 / offset=z;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Dale</description>
      <pubDate>Wed, 04 Aug 2010 18:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59697#M2770</guid>
      <dc:creator>Dale</dc:creator>
      <dc:date>2010-08-04T18:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Specify slope</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59698#M2771</link>
      <description>I finally got around to trying the code and it worked really well for my requirement.&lt;BR /&gt;
Thanks to both of you for the suggestions. the code that I used was the first one that Steve suggested - proc glm modeling the difference.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the help!</description>
      <pubDate>Thu, 16 Sep 2010 18:57:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Specify-slope/m-p/59698#M2771</guid>
      <dc:creator>SAS_User</dc:creator>
      <dc:date>2010-09-16T18:57:30Z</dc:date>
    </item>
  </channel>
</rss>

