LOWESS, Locally Weighted Scatterplot Smoothing for linear and non-linear data (enhanced) description

LOWESS- Locally Weighted Scatterplot Smoothing that does not require the statistical toolbox in matlab.This regression will work on linear and non-linear relationships between X and Y.Modifications:12/19/2008 - added upper and lower LOWESS smooths. These additional smooths show how the distribution of Y varies with X. These smooths are simply LOWESS applied to the positive and negative residuals separately, then added to the original lowess of the data. The same smoothing factor is applied to both the upper and lower limits. 2/21/2009 - added sorting to the function, data no longer need to be sorted. Also added a routine such that if a user also supplies a second dataset, linear interpolations are done one the lowess and used to predict y-values for the supplied x-values.10/27/2009 - modified the second user provided X-data for obtaining predictions. Matlab function unique sorts by default. It really was not needed in the section of code to perform linear interpolations of the x-data using the y-predicted LOWESS results. If the user does not supply a second x-data set, it will assume to use the supplied x-y data set. Thus there is an output (xy) that maintains the original sequence of the input. Additionally, the user can now include a sequence index as the first column of input data. This can be a datenum or some other ordering index. The output will be sequenced using that index. If a sequence index is provided a second subplot will be created show the predicted Y-values in the order of the included sequence index. I suspect this sequence index most often will be a DateTime (i.e. datenum). Just to the function generic enough, the X-axis labels are not converted to a nice date format, but the user could easily change that with a datetic attribute in the subplot.Using a robust regression like LOWESS allows one the ability to detect a trend in data that may otherwise have too much variance resulting in non-significance p-values.Yhat (prediction) is computed from a weghted least squares regression whose weights are both a function of distance from X and magnitude from of the residual from the previous regression.The logic of these functions and subfunctions follow the USGSKendall.exe routines. Because matlab is 8-byte precision, there are some very small differences between FORTRAN compiled and matlab. Maybe 64-bit OS's has 16-byte precision in matlab?Data are expected to be sorted prior to data input for this function. Sorted on first column of datain.There is a very simple subfucntion to create a plot of the data and regression if the user so choses with a flag in the call to the lowess function. BTW-- the png file looks much better than what the figure looks like on screen.There are loops in these routines to keep the memory requirements to a minimum, since it is foreseeable that one may have very large datasets to work with.f = a smoothing factor between 0 and 1. The closer to one, the more smoothing done.Syntax: [dataout lowerLimit upperLimit] = lowess(datain,f,wantplot,imagefile) datain = n x 2 matrix dataout = n x 3 matrix wantplot = scaler (optional) if ~= 0 then create plot imagefile = full path and file name where to output the figure to an png file type at 600 dpi. e.g. imagefile = 'd:templowess.png';where: datain(:,1) = x datain(:,2) = y f = scaler (0 < f < 1) wantplot = scaler imagefile = string datain must be sorted prior to loading into this function on the x-value. This is not done in the function because the user may want to have the end result be unsorted (e.g. time sort).dataout(:,1) = xdataout(:,2) = ydataout(:,3) = y-prediction (aka yhat)lowerLimit(:,1) = x with negative residualslowerLimit(:,2) = y-prediction of residuals + original y-predictionupperLimit(:,1) = x with positive residualsupperLimit(:,2) = y-prediction of residuals + original y-prediction

Similar scripts

Rob Keyboard
(Popularity: ) : This plugin is produced for holding on keyboard when pairing program. You can type "shift ctrl K" to lock intellJ by a Dialog with amusing words. You can lock intellJ by password, with configging password enabled.At first, you should add ... CIE Coordinate Calculator
(Popularity: ) : This software is for calculating the CIE chromaticity co-ordinates of phosphor materials using the photo luminescence data. The software also shows the position of the co-ordinates in chromaticity diagram and expected color of the material. Please note that the color ... New Dream Coder for Oracle
(Popularity: ) : This tool is an code generator for Oracle. While fetching large tables this tool reduces usage of memory. Some features of this tool are, it has new password ecryption, procedure builder, session monitor, SQL templates etc., It increases execution times ... Foreign Exchange Options
(Popularity: ) : fxoptions( S0, X, rd, rf, T, vol, style)Valuation of European and American call and put options on foreign exchange using Garman-Kohlhagen model.European option prices are given by an exact formula (Garman-Kohlhagen).American option prices are approximated using both binomial and trinomial ... Anti Cut and Paste
(Popularity: ) : This utility is helpful for programmers that allows them to search programming language source code's text fragments which have been copied and pasted. Some key features of this tool are, this tool supports both command line and Graphical User Interface ... AC Protect Standard
(Popularity: ) : This utility is used for avoiding hackers from cracking your software using special techniques called anti crack. It works with all windows platforms. Some features of this tool are, this tool compresses ocx, scr, exe, dll and more, dynamic encrypt ... VBcodePrint
(Popularity: ) : This Add-In to Microsoft Visual Basic 6 significantly enhances its source code printing capabilities. You can print any part of your VB project's source code from within the VB's development environment. / You can create and save your own output ... Bokai Barcode Image generator
(Popularity: ) : This tool is used for barcode generator and which has an ActiveX control for printing barcodes. This tool contains more than twenty five barcode types. This tool supports only ActiveX control programs. Users can customize barcode parameters and design of ... Use Matlab Editor to Write and Run Ansys Program.
(Popularity: ) : You don't have to switch your screen between Matlab, Ansys and UltraEdit or PSPad anymore, when you doing FEM-Analysis.You can use MEditor to write your Ansys APDL program and use the excellent feature of MEditor to structure your Code: Cell-Function, ... VBAcodePrint
(Popularity: ) : This add-in enables you to print Microsoft VBA source code in color of your applications across the entire Microsoft Office 2000 suite of applications: Word, Excel, Outlook, Access, PowerPoint, and FrontPage and any other VBA enabled software. / You can ...

User reviews

Similar Software

X-EXE
(Popularity: ) : X-EXE is an easy-to-use, but powerful program for encrypting and protecting your data. With X-EXE, you can encrypt files of any type using secure RC6 algorithm. Your self-extracting encrypted files can be viewed on any Windows PC without needing to ... Word Domino - Letters game for kids and grownups
(Popularity: ) : Designed with a speech therapist, this fun letter game is available for the whole family. <br /><br />It allows children from 6 years old to work on their vocabulary and reading skills, as well as mental organisation and scanning. <br ... Clipart for iWork and MS Office
(Popularity: ) : Clipart for iWork and MS Office package has 50 free different outstanding pictures which can be used in Apple's iWeb, Keynote, Pages, Numbers and many other applications on a Mac. <br /><br />The pictures are in two styles, with shadows ... Powerstaxx Non Linear
(Popularity: ) : Powerstaxx Non-Linear tolerance analysis software is an Excel based, associative tolerance analysis tool that makes it easy to be thorough. Being associative, all dimensions are managed on one sheet and then used to populate up to 200 worst case, RSS, ... UltimaCalc Professional
(Popularity: ) : A set of mathematical tools, for scientists, engineers and students. Perform symbolic algebra: simplify expressions, differentiate them, integrate them and see how the result was obtained. Factorise polynomials, multiply and divide them, find their GCDs. Solve linear and non-linear equations, ... Organizer Service CRM :Premium Edition 2011R
(Popularity: ) : Spinso Organizer Premium Edition is a comprehensive ready to use service CRM to manage complete servicing process that includes Inventory, Billing, Payments, Complaints and Service Contract Management,additional billing options Features Complaint management: Assigning the complaint to the technician, tracking the ... Regression Analysis - DataFitting
(Popularity: ) : DataFitting is a powerful statistical analysis program that performs linear and nonlinear regression analysis (i.e. curve fitting). DataFitting determines the values of parameters for an equation, whose form you specify, that cause the equation to best fit a set of ... Scientific Calculator - ScienCalc
(Popularity: ) : ScienCalc is a convenient and powerful scientific calculator. ScienCalc calculates mathematical expression. It supports the common arithmetic operations (+, -, *, /) and parentheses. The program contains high-performance arithmetic, trigonometric, hyperbolic and transcendental calculation routines. All the function routines therein ... Compact Calculator - CompactCalc
(Popularity: ) : CompactCalc is an enhanced scientific calculator for Windows with an expression editor. It embodies generic floating-point routines, hyperbolic and transcendental routines. Its underling implementation encompasses high precision, sturdiness and multi-functionality. With the brilliant designs and powerful features of CompactCalc, you ... Regression Analysis - CurveFitter
(Popularity: ) : CurveFitter program performs statistical regression analysis to estimate the values of parameters for linear, multivariate, polynomial, exponential and nonlinear functions. The regression analysis determines the values of the parameters that cause the function to best fit the observed data that ...