Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Re: Data fitting


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Re: Data fitting
Date   Sun, 2 Mar 2003 18:37:27 -0600

----- Original Message ----- 
From: "victor michael zammit" <vmz@vol.net.mt>
To: <statalist@hsphsun2.harvard.edu>
Sent: Sunday, March 02, 2003 2:47 PM
Subject: st: Re: Data fitting


> Hello,
> does Stata have any programming language that one can use to describe a
> function that might  fit the following data values :
> X   Y
> 1    2
> 2    3
> 3    4
> 4    5
> 5    6
> 6    7
> 7    6
> 8    8
> 9    10
> 10  12
> 11  10
> 12  8
> 13  8.5
> 14  9
> 15  8
> 16  7
> 17  6
> 18  5
> 19  4
> 20  3
> hope for the best
> Victor.
> 

How about 
reg y x in 1/10
reg y x in 11/20

or you could use -spline-

findit spline (if you don't already have it)
spline y x, knots(1)

Scott



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index