Re: linfit and regress questions [message #56686] |
Mon, 12 November 2007 02:02  |
rlayberry
Messages: 33 Registered: November 2004
|
Member |
|
|
On 11 Nov, 16:49, hradilv <hrad...@yahoo.com> wrote:
> On Nov 11, 10:42 am, rlaybe...@hotmail.com wrote:
>
>
>
>
>
>> On 11 Nov, 16:37, hradilv <hrad...@yahoo.com> wrote:
>
>>> On Nov 11, 10:27 am, rlaybe...@hotmail.com wrote:
>
>>>> Hi
>
>>>> I am interested in fitting a line of the form y=mx+c using regress or
>>>> linfit. I want the option of fixing the value of c at zero. Can I do
>>>> this in either of these 2 functions or would I need to use something
>>>> else?
>
>>>> Thanks
>
>>>> Russ
>
>>> Just write it yourself:
>
>>> mhat = total(x*y)/total(x*x)
>
>>> http://mallit.fr.umn.edu/fr5218/reg_refresh/origin.html
>
>> thanks. is that really true? this gives the best fit? great, that's
>> one problem solved. what about if I want to set the intercept to c1?
>
>> russ
>
> Transform the data?
>
> mhat = total(x*(y-c1))/total(x*x)- Hide quoted text -
>
> - Show quoted text -
thanks hradilv, you've saved me a few hours!
|
|
|
|
|
|
|