f



nonlinear best-fit line

Good afternoon,

I am having trouble trying to figure out how to fit a nonlinear best fit
line to my data in SAS.  Any help would be greatly appreciated.

Regards,

Ligia
0
2/18/2009 10:38:24 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
372 Views

Similar Articles

[PageSpeed] 24

Reply:

Similar Artilces:

Re: nonlinear best-fit line
> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of Ligia Buia > Sent: Wednesday, February 18, 2009 2:38 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: nonlinear best-fit line > > Good afternoon, > > I am having trouble trying to figure out how to fit a > nonlinear best fit > line to my data in SAS. Any help would be greatly appreciated. > > Regards, > > Ligia > > I think you will need to provide more information to get any useful advice. There are ways to do nonlinear estimation in a variety of contexts. You can also compute a fit for curvilinear data using linear regression techniques. So can you tell us what your data look like, and what the context is for this project? Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204 ...

Re: nonlinear best-fit line #2
I am looking at the values of a biological marker since time of disease diagnosis. Each point on my scatterplot represents a different person, but the time since disease diagnosis at which the lab was drawn varies (with most points occurring within 4 months of diagnosis). I think there might be a "dip" in values at some point and a linear, straight best fit line is obviously obscuring that. I would like to plot a best fit line that minimizes my residuals at each point in time. And also, look at a trend test statistic. Hope that makes it more clear... Thank you for your time. On Wed, Feb 18, 2009 at 6:30 PM, Nordlund, Dan (DSHS/RDA) < NordlDJ@dshs.wa.gov> wrote: > > -----Original Message----- > > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > > Behalf Of Ligia Buia > > Sent: Wednesday, February 18, 2009 2:38 PM > > To: SAS-L@LISTSERV.UGA.EDU > > Subject: nonlinear best-fit line > > > > Good afternoon, > > > > I am having trouble trying to figure out how to fit a > > nonlinear best fit > > line to my data in SAS. Any help would be greatly appreciated. > > > > Regards, > > > > Ligia > > > > > I think you will need to provide more information to get any useful advice. > There are ways to do nonlinear estimation in a variety of contexts. You > can also compute a fit for curvilinear data using linear regression > technique...

Best fit line for an exponential line
Hi, I am new to using GNUPLOT and am trying to find the best fit line (to determine the slope) of a line that follows Power Law (is an exponential line). I realize I have to use a function f(x) = a*b**x. But, I do not know what to do next. Any help in this matter would be greatly appreciated. Thanks, Divya Divya Rao <divyarao09@yahoo.com> wrote: > Hi, > I am new to using GNUPLOT and am trying to find the best fit line (to > determine the slope) of a line that follows Power Law (is an > exponential line). First, a terminology issue: an exponential curve doesn't have a "slope" to speak of. More precisely, the slope is different at every place, so it's not a property of the curve as such, but of each point on the curve. > I realize I have to use a function f(x) = a*b**x. That's one way of expressing it. f(x)=a*exp(x/k) or f(x)=exp(b1*(x-x0)) and any variations of those may be just as valid choices. > But, I do not know what to do next. Any help in this matter would be > greatly appreciated. Read through "help fit" and you should be on your way. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain. On Tuesday 04 May 2004 12:53, Divya Rao (divyarao09@yahoo.com) held forth in comp.graphics.apps.gnuplot (<69dbc103.0405040853.25260afb@posting.google.com>): > Hi, > I am new to using GNUPLOT and am try...

Line of best fit
I'm a total newbie at this guys. I have the following data in an .m file: x = 0:2:20; y = [0.02 0.26 0.35 0.53 0.66 0.78 0.88 0.96 1.03 1.06 1.14]; plot(x,y,'rx'); How would i fit a line of best fit to this graph? I know this is rudimentary stuff but as i said i'm a total newbie!!! Cheers for any help help polyfit /Johan Jamie Sutton wrote: > I'm a total newbie at this guys. > I have the following data in an .m file: > > x = 0:2:20; > y = [0.02 0.26 0.35 0.53 0.66 0.78 0.88 0.96 1.03 1.06 1.14]; > plot(x,y,'rx'); > > How would i fit...

Best fit line?
Hi. Is there a function to calculate/plot the best fit line given a few (approx 3) points? I don't have any toolboxes, nor can I afford any. Can any function in the basic matlab application do this? Thanks! "Amir " <amirschricker.DELETE@DELETE.gmail.DELETE.com> wrote in message <g4o8va$aa7$1@fred.mathworks.com>... > Hi. Is there a function to calculate/plot the best fit line > given a few (approx 3) points? I don't have any toolboxes, > nor can I afford any. > > Can any function in the basic matlab application do this? Yes. help polyfit J...

Best Fit Line
Hello, I have a problem that is puzzling me for very long.I got this problem of fitting in 80 over text files and within each txt file,it contains about 120 datas.I want to from these datas generate a best fit line to cut through all these points.The program I am now using is Matlab.Please help and reply asap,as I need the info urgently. Thanks. In article <a488ubsdofj7@legacy>, kellyblue19@yahoo.com (Eid) writes: >Hello, > I have a problem that is puzzling me for very long.I got this >problem of fitting in 80 over text files and within each t...

Outputting lines of best fit
I have a set of data in an array (11000,207). I've been asked to detrend the data in each of the 207 columns individually. I've tried using the Matlab detrend but I cant get it to work in a sensible way for this data. Instead I've been trying to ouput the equation for a line of best fit for the data in each column and then subtract that from the data. Seems a simple task but the only way I have found to find a line of best fit is doing it manually once you have a figure up using the best fitting option in tools. Obviously I don't want to do this manually 207 times. Does any...

Best fit line in subplot
I want to add a linear trendline in both the plots of subplot. How do i do this, when i do this using the basic fitting option from the tools menu of figure, the line appears only for one data set ata time, i want to do it for both the data sets. You're right, it doesn't seem possible to do it with the Basic Fitting tool. I guess you have to do it by hand, like this: %%%%% x=[0:0.005:1.5]; %curve 1 y=sin(x); %linear fit 1 p = polyfit(x,y,1) y_lin = polyval(p,x); %curve 2 z=cos(x); %linear fit 2 p = polyfit(x,z,1) z_lin = polyval(p,x); %plot subplot(1,2,1) h(1)=plot(x,y) hold on h(2)=...

Best least-squares line fit
I copied the best least squares line fit algorithm from Graphics Gems V book, but now i'm having problems with vertical lines, although the book claims that the algorithm can handle vertical lines. For example using 0,0 and 0,2 as test points gives a=0 and b=0 and c=0 for the line ax + by = c, although it should be something like a=1, b=0, c=0. Here is my code: void best_fit(void) { if(n_points<2) { a=1; // dummy values b=1; c=0; return; } double sx=0; double sy=0; double sxx=0; double syy=0; double sxy=0; for(point *p=points.first(); p; p=p->next) { sx += p->x; sy += p->y; } double xmid = sx/n_points; double ymid = sy/n_points; for(p=points.first(); p; p=p->next) { double x1 = p->x-xmid; double y1 = p->y-ymid; sxx += x1*x1; syy += y1*y1; sxy += x1*y1; } double a1 = sxx-syy; double b1 = sxy; a = 2*b1; b = - (a1 + sqrt(a1*a1 + 4*b1*b1)); c = - a*xmid - b*ymid; if(a==0.0 && b==0.0) // try to solve the vertical line problem { a=1; c=-xmid; } } "Markku Poysti" <ukram@puosu.dna.fi_nospam> wrote in message news:3fba8264$0$6509$1b6aedd2@news.songnet.fi... > I copied the best least squares line fit algorithm from Graphics Gems V book, > but now i'm having problems with vertical lines, although the book claims that > the algorithm can handle vertical lines. <snip> The derivation has problems. For example, consider equation (3) which has x*sin(theta)+...

Best fit line with constrained coefficients
I am trying to fit a line to my data points, and while polyfit and regstats will easily fit a line, it may not be physically relevant. How do I edit these functions so they will fit a regression line with a positive slope. If you care, here is some sample data. x=[282.2540 285.8649 253.2350 271.8654 293.8727 293.8727 106.1968 226.1100]; y=[104.8101 116.0248 112.0172 106.1792 117.0507 64.0306 115.3988 102.3172] And I know the line should be positive, but polyfit generates a line with negative slope. "Nathan " <ndn3@georgetown.edu.remove.this> wrote in m...

line of best fit on 3D scatter
Is there a way to draw a line of best fit on a 3D scatter plot (scatter3)? Thanks. On Mar 28, 7:02=A0am, "J G" <jemma.geoghe...@gmail.com> wrote: > Is there a way to draw a line of best fit on a 3D scatter plot (scatter3)= ? =A0Thanks. doc plot3 Rune ...

how do i find where 2 best fit lines cross?
Hi I was wondering if anyone knows a way to find where 2 best fit lines cross, I don't have the equation for the lines and i'm not sure if I can get it. I currently have the program tracing the lines and comparing y values however it will only increment in steps of 0.1 on the x-axis and i need an accuraccy of 0.0001 &nbsp; hi there i suppose you have three 1D arrayswith the same number of elements: the x-values, y-values curve 1 and y-values curve 2. you can now use the Interpolate 1D Array - function to interpolate the y-values of the curves. see attachment (not tested, but it sh...

Create line of best fit from two matrices
So I have two matrices, both are 9 rows by 45 columns (they are behavioral data from an experiment). Matrix A are the values of the x-axis, Matrix b are the values of the y-axis. Each column is a different person, and they correspond between matrices (ie. column 1 and column 1 in B are both Subject 101). What I would like to know is how to find a line of best fit for each of the subjects (all I need is the slop of the line of best fit). On 08/26/2015 5:05 PM, Peter Whitehead wrote: > So I have two matrices, both are 9 rows by 45 columns (they are > behavioral data from an experime...

Line of best fit and averaging across rows of matrix
Hi there, I have a question that no doubt will be pretty basic to most users out there, but I am a recent convert to Matlab and so don't have much experience. I have two equal sized matrices of dimensions [m n], of which I wish to fit a linear line of best fit ('fit_B') to each row in turn. Matrix A is my x data, matrix B is my Y data. Each row represents data measured at a specific time. What I am trying to do is: 1) Create a line of best fit for row k=1:m of matrices A and B 2) Create a new matrix ('fitted_B') of the same dimensions as B 3) Average the data so that a ...

Identifying lines and arcs as best fit to a series of points
Hello all, Google is a mess on this subject or/and I do not know what should my query be. The problem is this: I have a series of 2D points. I want to approximate this "string" with consecutive straight lines and circular arcs with variable "accuracy". Is there an algorithm to do this? If yes, is there any source code? C++, fortran, vb, pascal, delphi... anything is ok. TIA, Aristotelis In article <d45ki0$3bv$1@ulysses.noc.ntua.gr>, "Aristotelis E. Charalampakis" <arisNOSPAM@technologismikiREMOVEIT.com> wrote: > Hello all, > > Google is a mess on this subject or/and I do not know what should my query > be. > > The problem is this: I have a series of 2D points. I want to approximate > this "string" with consecutive straight lines and circular arcs with > variable "accuracy". Is there an algorithm to do this? > > If yes, is there any source code? C++, fortran, vb, pascal, delphi... > anything is ok. > > TIA, > Aristotelis It might help people frame their responses if you can give some more details about the kind of input data you expect, and any special properties you want to impose on the line segments and arcs that you use to approximate the data. Do you expect to have input data in which the linear and circular portions are very clearly distinguishable? Or will the arcs sometimes be very small (as in a small number of points) or quite close to linear...

Best SAS Clinical Online Training | Online SAS Clinical Training | Training SAS Clinical Online
SAS Clinical Online Training course by SUN IT Labs. We have excellent exper= ienced IT professionals who have more then 10+ Years of real time experienc= e Our trainers has good training experience so that best quality output wil= l be delivered. We also give interview support & Technical support. We mark= et your profile in USA, UK SINGAPORE, INDIA, and SOUTH AFRICA. We will give= you 100% Satisfaction and we provide best quality real time online trainin= g. We have completed more than 200 SAS Clinical batches through Online SAS = Clinical Training program, Our SAS Clinical Classe...

Best Fit Line with forced 0,0 intercept and <0 slope at origin and no sign change in second derivative
I have the following data, and I need to create a best fit line with a forced 0,0 intercept and a slope <0 at the origin. Also, it can't have a sign change in second derivative (so exponential or logarithmic fits would be good). Where do I even begin? I have code that forces the intercept, but the slope seems to be the tricky part. EXAMPLE: x axis: original data: acceptable fit: unacceptable fit: 0 0 0 0 1 -1 -.1 .25 2 ...

Best of the best,of the best, with honors.
http://www.displaymate.com/iPad_ShootOut_1.htm And now watch the WinTrolls blow a gasket in 3, 2, 1..... Hehe On Tuesday, March 20, 2012 12:57:54 PM UTC-4, jdear wrote: > http://www.displaymate.com/iPad_ShootOut_1.htm > > And now watch the WinTrolls blow a gasket in 3, 2, 1..... > > > Hehe 3.5" screen and 9" screen. Hehehe is right. Goes to watch a 3D movie on 70" Pioneer Kuro. ...

Once again: nonlinear fitting
Hi all, i want to do an exponential fit using gnuplot. I am aware that it is an art ;-) and i studied the info source as well as this newsgroup. But i'm still not understanding what's happening :-( I have a set of data 828.281 6.990E-07 828.373 2.357E-04 829.182 3.106E-02 835.662 1.899E-02 857.601 6.479E-01 865.474 4.724E+00 which is not really superb for an exponential fit but i have to try. So i tried the following a = 1E-50 b = 7.42 L(x) = a*exp(x/b) # FIT_LIMIT = 1e-100 # FIT_MAXITER = 0 fit L(x) 'L.dat' via a,b plot 'L.dat', L(x) First i guessed a set of initial values which i check by plotting the function. If i then try to fit to achieve a better result. The iteration ends after one step: Iteration 0 WSSR : 22.6854 delta(WSSR)/WSSR : 0 delta(WSSR) : 0 limit for stopping : 1e-100 lambda : 1.60359e+50 initial set of free parameter values a = 1e-50 b = 7.42 / Iteration 1 WSSR : 22.6453 delta(WSSR)/WSSR : -0.0017734 delta(WSSR) : -0.0401591 limit for stopping : 1e-100 lambda : 1.60359e+49 resultant parameter values a = 1.77558e-50 b = 7.42 After 1 iterations the fit converged. final sum of squares of residuals : 22.6453 rel. change during last iteration : -0.0017734 degrees of freedom (ndf) : 4 rms of residuals (stdfit) = sqrt(WSSR/ndf...

Nonlinear Fit
I am trying to do a nonlinear fit of a function that contains a numerical integration. My problem is that when I call the nonlinear fit, it tries to evaluate within the nonlinear fit call. For example: Test=Function[{x1,a1}, NIntegrate[a*x^3,{x,0,100}] ]; NonlinearFit[data,Test[x,a],x,{a,0,1}] Here I have a variable x and a parameter a. This would return an NIntegrate error saying that 'NIntegrate is not numerical at x={50.}' because there is an unknown, a, in the integration. It tries this a couple times and then shuts off the functioning of NIntegrat...

Best fitness vs mean fitness, initial range #2
1) Based on the example of Rastrigin's function. At the plot function, if I chose 'best fitness', on the same graph 'mean fitness' will also be plotted. I understand well about 'best fitness' whereby it plots the best function value in each generation versus iteration number. It will reach value zero after some times. I don't understand about 'mean fitness'in the graph plotted. What do those 'mean fitness' values mean? How does the 'mean fitness' graph help to understand Rastrigin's function? 2) What are the meaning of the term initial population, initial score and initial range? I wish to have a better understanding of these terms. 3) The default value for initial range is [0,1]. Does it mean that 0 is the lower bound (lb) and 1 is the upper bound (ub)? Do these values interfere with the lb and ub values I set at the constraints? On 11/28/2012 3:23 AM, Sata wrote: > 1) Based on the example of Rastrigin's function. At the plot > function, if I chose 'best fitness', on the same graph 'mean fitness' > will also be plotted. I understand well about 'best fitness' whereby > it plots the best function value in each generation versus iteration > number. It will reach value zero after some times. > > I don't understand about 'mean fitness'in the graph plotted. What do > those 'mean fitness' values mean? How does the ...

Online SAS Training in USA | UK | Best SAS Online Training in INDIA
SAS Online Training is the one of the best online course thorough worldwide= which is provided by 123Trainings. Our training methodology is very unique= when compare to the all online training institutes. We are one of the most= trusted SAS Online Training institutes among the world. All our trainers a= re skilled trainers and additionally have the real time experience with pro= ven track record in SAS Online Trainings. We are providing training through= the online for SAS and give placement assistance for trained people accord= ing to the student requirements. Some of the SAS Co...

Fit Data to best type of fit (using code and not cftool). HELP Pleaseeee!
Any help would be highly appreciated. I have two sets of data points, x = [........] and y = [............]. When I plot the y vs x graph, I get a plot similar to the exponential plot. However, I am trying to fit this data set through all the different possible types of fit and not just exponential fit to select the best type fit, similar to what can be done using cftool, but I want to implement it using code in MatLab. I am doing this to find the best fit to my set of data (y vs x) and get the fit coefficients; i want to use all different types of fit, so in case I do change my data (whic...

Online SAS Training in USA | UK | Best SAS Online Training in INDIA
SAS Online Training is the one of the best online course thorough worldwide= which is provided by 123Trainings. Our training methodology is very unique= when compare to the all online training institutes. We are one of the most= trusted SAS Online Training institutes among the world. All our trainers a= re skilled trainers and additionally have the real time experience with pro= ven track record in SAS Online Trainings. We are providing training through= the online for SAS and give placement assistance for trained people accord= ing to the student requirements. Some of the SAS Co...

Web resources about - nonlinear best-fit line - comp.soft-sys.sas

Web Development and Marketing Solutions - nonlinear creations
nonlinear creations is a marketing and technology services company. Founded in 1995, we build digital solutions for global customers. We have ...

Nonlinear optics - Wikipedia, the free encyclopedia
V/m) such as those provided by pulsed lasers . Above the Schwinger limit , the vacuum itself is expected to become nonlinear. In nonlinear optics, ...

nonlinear on the App Store on iTunes
Get nonlinear on the App Store. See screenshots and ratings, and read customer reviews.

Nonlinear Marketing: Convergence of Online and Offline
We live in a world where consumers are bombarded with all sorts of advertising and marketing tactics— they see a billboard on the road, hear ...

The New, Lifelong, Nonlinear Path Through College - NEXT: The Future of Higher Education - The Chronicle ...
Students in the future are likely to attend multiple institutions and providers (not just colleges), combine jobs and classrooms, and spend a ...

Trend and Nonlinear Cyclical Employment Dynamics
One of the central puzzles following the financial crisis and the ensuing Great Recession has been the sluggish growth in employment during the ...

Drone Strikes and the Lessons of Nonlinear Science
The use of unmanned aerial vehicles (UAVs), or drones, to carry out targeted killings of suspected terrorist leaders has become a centerpiece ...

Patent US2530110 - Nonlinear circuit device utilizing germanium - Google Patents
... in Advanced Patent Search Patents www.google.com http://www.google.com/patents/US2530110?utm_source=gb-gplus-share Patent US2530110 - Nonlinear ...

Luis P. Villarreal: We Need a Nonlinear Language for Life - Suzan Mazur
Having just published a book on the origin and synthesis of life, I was fascinated to learn that I'd missed interviewing one of the field's most ...

Nonlinear Studio’s Amplifiear Pumps Up the Volume on Your iPad Electricity and Cord Free
... flaw: the less-than-optimal back-facing speaker. In order to bring the volume up without resorting to external speakers or headphones, Nonlinear ...

Resources last updated: 3/16/2016 11:35:42 AM