<?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 apply a bonus/malus on a linear Model in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-apply-a-bonus-malus-on-a-linear-Model/m-p/657469#M31476</link>
    <description>&lt;P&gt;I am sure that there are ways to fit this with a nonlinear model, but since you specify values for B3, rather than solving for an optimal B3, I believe your idea of transforming the response variable is quite clever, and should provide an analysis.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jun 2020 12:24:15 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2020-06-11T12:24:15Z</dc:date>
    <item>
      <title>How to apply a bonus/malus on a linear Model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-apply-a-bonus-malus-on-a-linear-Model/m-p/657406#M31472</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm looking to run estimate a model that looks like this :&lt;/P&gt;
&lt;P&gt;Y = (intercept + B1*X1 + B2*X2)*B3*X3&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where B1, B2 and B3 are the coefficients for the categorical variables X1, X2 and X3. Note that I already know the coefficients for each modality of X3 (it is a Bonus variable whose coefficients are under the form : 0.5; 0.51 ; ... ; 0.99).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure what I should to estimate this kind of model. Until now i was using a GLM. My idea was to transform the Y variable into a Y2=Y/(B3*X3) and then run the GLM where the X3 variable is specified but there would be no need to calculate the B3 coefficients...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But maybe an other specification or procedure would be better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope i was clear enough. Thank you for your help. Have a good day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 09:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-apply-a-bonus-malus-on-a-linear-Model/m-p/657406#M31472</guid>
      <dc:creator>Mathis1</dc:creator>
      <dc:date>2020-06-11T09:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply a bonus/malus on a linear Model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-apply-a-bonus-malus-on-a-linear-Model/m-p/657469#M31476</link>
      <description>&lt;P&gt;I am sure that there are ways to fit this with a nonlinear model, but since you specify values for B3, rather than solving for an optimal B3, I believe your idea of transforming the response variable is quite clever, and should provide an analysis.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 12:24:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-apply-a-bonus-malus-on-a-linear-Model/m-p/657469#M31476</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-06-11T12:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply a bonus/malus on a linear Model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-apply-a-bonus-malus-on-a-linear-Model/m-p/657566#M31487</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I did the transformation of Y, but then I don't know how to take the X3 variable into account without asking GLM to predict the coefficients...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if i don't take it into account, I get a R^2 divided by almost 2...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 15:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-apply-a-bonus-malus-on-a-linear-Model/m-p/657566#M31487</guid>
      <dc:creator>Mathis1</dc:creator>
      <dc:date>2020-06-11T15:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply a bonus/malus on a linear Model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-apply-a-bonus-malus-on-a-linear-Model/m-p/657619#M31492</link>
      <description>&lt;P&gt;So you should have 50 copies of your data, stepping from 0.5 to 0.99 for B3, where you calculate your new Y variable values based on dividing Y by B3 times the&amp;nbsp; value of X3.&amp;nbsp; So if you fit this rescaled Y with PROC GLM with MODEL Yrescal= X1 X2/solution; and with B3 as a BY variable, you should get 50 R^2 values.&amp;nbsp; From there you can plot what you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The drawback here is that you said X3 is categorical.&amp;nbsp; So I have to ask, does the fixed B3 value apply equally to all levels?&amp;nbsp; If X3 has 2 levels, then per GLM parameterization, you would have a vector that looks like [1 0} for the first level and [0 0] for the second level (reference level).&amp;nbsp; So the rescaled Y&amp;nbsp; would be Y/B3 for the first level, and Y for the second level.&amp;nbsp; Easy enough.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But suppose X3 has 3 levels.&amp;nbsp; You will now need vectors with 3 elements [1 0 0] for level 1, [0 1 0] for level 2 and [0 0 0] for level 3.&amp;nbsp; Because you are fitting a constant B3, your rescaled values would look like Y/B3 for level 1, Y/B3 for level 2, and Y for level 3.&amp;nbsp; If this makes sense, then eveything is OK.&amp;nbsp; I feel uncomfortable dividing all of the non-reference level values of Y by the current B3, and leaving the reference level unchanged.&amp;nbsp; I suspect I have missed something critical in the design for your data, so additional information would be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 17:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-apply-a-bonus-malus-on-a-linear-Model/m-p/657619#M31492</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-06-11T17:31:18Z</dc:date>
    </item>
  </channel>
</rss>

