<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">Hi, Ana, </div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">Once you already have the values for a and b in y=ax+b, being time your x, I imagine you could use the time variable of you file and do something like:<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">'a=(your a value here)'</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">'b=(your b value here)'</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">while (count < number)</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">'set t ' count <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"> 'y=a*t + b'</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><div class="gmail_default"> y=subwrd(result,4)</div><div class="gmail_default"> rc = write ("path\file.txt",y)</div><div class="gmail_default"> count=count+1<br></div></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">endwhile</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">Then you will have a txt with a y value for each t in one column. Is this what you need?</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">Best,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 30, 2016 at 1:02 PM, Ana Tobón <span dir="ltr"><<a href="mailto:ana.tobon@outlook.com" target="_blank">ana.tobon@outlook.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello,</p>
<p><br>
</p>
<p>I'm relatively new in GrADS and I have a question. I have a NetCDF file and with a grads script I could calculate the intercept and the slope of a linear regression model. Now I need to construct the fitted model (y=a+bx) based on the slope and intercept
I calculated before being the time the independent variable, how can I create a time variable or how can I construct the fitted model? This way I would have the fitted model and I could calculate the residuals which is what I need.</p>
<p><br>
</p>
<p>Thanks in advance,</p>
<p>Ana.</p>
</div>
</div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><font color="#20124d" face="tahoma, sans-serif">David</font></div></div></div></div></div></div>
</div>