<?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: Novice here: Nonlinear Regression - fitting my data to a nonlinear line in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527519#M26672</link>
    <description>&lt;P&gt;If you want to fit separate spline models for each subject and level combination, then specify BY SUBJECT LEVEL; rather than CLASS SUBJECT LEVEL; .&amp;nbsp; If instead you want a single model including those variables as predictors, then keep the CLASS statement and add PARAM(SUBJECT LEVEL) in your MODEL statement.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jan 2019 21:20:50 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2019-01-15T21:20:50Z</dc:date>
    <item>
      <title>Novice here: Nonlinear Regression - fitting my data to a nonlinear line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527192#M26663</link>
      <description>&lt;P&gt;Hi all -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have run a linear regression on my&amp;nbsp;students' test score data and the r-squared value is high and p-value is low which would be great - except my residuals plot showed a different story.&amp;nbsp;The residual plots did not show uniform randomness, my data appeared to be curved/not-linear. My residuals histogram is skewed a bit to the right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems as though I need to transform a variable or create a nonlinear model. But I need help with SAS on how to do this.&amp;nbsp;Some random, sample data is attached here that shows the types of data i'm using. I am using the following variables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dependent Variable: Mean Test Score&lt;/P&gt;&lt;P&gt;Independent Variable: % Free and Reduced Lunch&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;amp; I am separating my analyses by test subject (literacy or math).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have NO idea how to run a procedure in SAS to help me build a nonlinear model. Is anyone able to assist me or point me in the right direction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried PROC NLIN, but get lost with the parameters...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 00:39:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527192#M26663</guid>
      <dc:creator>gan024059</dc:creator>
      <dc:date>2019-01-15T00:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Novice here: Nonlinear Regression - fitting my data to a nonlinear line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527214#M26664</link>
      <description>&lt;P&gt;To give us an idea of the type of model required, could you post the graph resulting from a loess fit, something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=myData; by subject frl; run;

proc sgpanel data=myData;
panelby subject / onepanel;
loess y=score x=frl;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Jan 2019 05:22:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527214#M26664</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-01-15T05:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Novice here: Nonlinear Regression - fitting my data to a nonlinear line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527322#M26666</link>
      <description>&lt;P&gt;Very flexible models can be fit by using splines. Models with splines can be easily fit in PROC GAMPL. See the examples in the GAMPL documentation in the SAS/STAT documentation.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 14:58:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527322#M26666</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2019-01-15T14:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Novice here: Nonlinear Regression - fitting my data to a nonlinear line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527463#M26667</link>
      <description>&lt;P&gt;Absolutely! See attached for the Loess graphs.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 19:10:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527463#M26667</guid>
      <dc:creator>gan024059</dc:creator>
      <dc:date>2019-01-15T19:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Novice here: Nonlinear Regression - fitting my data to a nonlinear line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527484#M26668</link>
      <description>&lt;P&gt;Those relationships look fairly linear to me.Try exploring the linear effects with something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=myData plots=(diagnostics residuals);
where subject ne "Spanish Language Art...";
class subject level;
model ssAvg = FRLPercent subject|level FRLPercent*subject FRLPercent*level;
output out=myOutput r=resid p=pred;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Jan 2019 20:12:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527484#M26668</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-01-15T20:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Novice here: Nonlinear Regression - fitting my data to a nonlinear line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527497#M26669</link>
      <description>&lt;P&gt;Hmmmm, yeah the residuals look pretty good when I do the proc glm like that, see attached. What do you think?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 20:48:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527497#M26669</guid>
      <dc:creator>gan024059</dc:creator>
      <dc:date>2019-01-15T20:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Novice here: Nonlinear Regression - fitting my data to a nonlinear line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527510#M26670</link>
      <description>&lt;P&gt;Hi Dave, thanks so much for responding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this look right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gampl data=cmasRegAnalysis;&lt;BR /&gt;class subject level;&lt;BR /&gt;model ssAvg = spline(FRLPercent);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 21:08:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527510#M26670</guid>
      <dc:creator>gan024059</dc:creator>
      <dc:date>2019-01-15T21:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Novice here: Nonlinear Regression - fitting my data to a nonlinear line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527518#M26671</link>
      <description>&lt;P&gt;However the proc gampl doesn't allow me to separate the output by subject and level?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 21:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527518#M26671</guid>
      <dc:creator>gan024059</dc:creator>
      <dc:date>2019-01-15T21:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Novice here: Nonlinear Regression - fitting my data to a nonlinear line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527519#M26672</link>
      <description>&lt;P&gt;If you want to fit separate spline models for each subject and level combination, then specify BY SUBJECT LEVEL; rather than CLASS SUBJECT LEVEL; .&amp;nbsp; If instead you want a single model including those variables as predictors, then keep the CLASS statement and add PARAM(SUBJECT LEVEL) in your MODEL statement.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 21:20:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527519#M26672</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2019-01-15T21:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Novice here: Nonlinear Regression - fitting my data to a nonlinear line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527525#M26673</link>
      <description>&lt;P&gt;Thank you! Attached is my output. Do you have any good resources to help me understand my output from proc gampl?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 21:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527525#M26673</guid>
      <dc:creator>gan024059</dc:creator>
      <dc:date>2019-01-15T21:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Novice here: Nonlinear Regression - fitting my data to a nonlinear line</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527726#M26679</link>
      <description>&lt;P&gt;GAMPL looks for a form of the spline that fits the shape of your data. The&amp;nbsp;linear shape of what it decided on&amp;nbsp;and the Effective degrees of freedom equal to 1 indicates that there is no nonlinearity. In the examples in the GAMPL documentation you will see examples where the plotted spline shape and the degrees of freedom are quite nonlinear.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 15:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Novice-here-Nonlinear-Regression-fitting-my-data-to-a-nonlinear/m-p/527726#M26679</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2019-01-16T15:03:50Z</dc:date>
    </item>
  </channel>
</rss>

