Rank: 4193 based on 9 downloads (last 30 days) and 2 files submitted
photo

AS

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by AS View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
03 Dec 2008 Cohen's Kappa (with customizable weightings) A script to calculate Cohen's Kappa with the ability to do customizable weightings. Author: AS cohens kappa, interobserver agreeme... 5 0
12 Sep 2008 Integrate (wrapper for dealing with infinite bounds) A wrapper for quad to deal with inf bounds. Author: AS integration, integrate, improper integral, infinite bounds 4 1
  • 4.0
4.0 | 2 ratings
Comments and Ratings by AS
Updated File Comments Rating
07 Jul 2011 quantreg.m - quantile regression Quantile regression with bootstrapping confidence intervals Author: Aslak Grinsted

One unexpected thing with this code. Suppose I have a Y vector and want to regress it on one explanatory variable, but also include a constant in my regression. Then my X matrix has 2 columns, the first column is just ones, the second is the explanatory variable. It should still be possible to plot this along with the results from the regression.

Currently, however, if you run:
quantreg([ones(length(x),1) x], y,.5)
You get an error because it tries to plot it, but order has been set (line 44) to [], so things get messed up.

Additionally, the plots that do get produced look odd because the default is to draw lines between all of the points, which usually isn't what you want. For example, this doesn't look like what it should:
x=randn(1000,1);
y=1+5*x+randn(1000,1);
quantreg(x,y,0.5)

Finally, there's a problem with the error checking of inputs (lines 41-47) because it's all one big if-else statement. If you only put in three inputs, then line 44 runs and order gets set to [], but then the program exits the if-else statement and so Nboot never gets set correctly. You should split these up into separate if statements because if there are only 3 inputs then you need to set both order and Nboot.

Comments and Ratings on AS's Files View all
Updated File Comment by Comments Rating
23 Jul 2009 Integrate (wrapper for dealing with infinite bounds) A wrapper for quad to deal with inf bounds. Author: AS Serge

12 Sep 2008 Integrate (wrapper for dealing with infinite bounds) A wrapper for quad to deal with inf bounds. Author: AS D'Errico, John

I was tempted to rate this lower, but it is an interesting code, transforming definite integrals over infinite domains to more manageable problems.

It fails in its help, which is poor. I found an inadequate description of the parameters. I found only limited error checks. I found no examples of use. I did find a superfluous number of %%%% symbols. The author might have spent more time on the help, and less effort holding his finger down on the % key.

The H1 line was missing. What is an H1 line? It is the very first line of the help block in your function. It enables the lookfor functionality in matlab. The author apparently has never looked closely at the help blocks for the codes that come from the MathWorks. When someone wants to remember the name of your function next year, how will they find it? They might try to use lookfor, but it will find nothing from this code.

I wanted to rate this as a 2.5.

Top Tags Applied by AS
cohens kappa, improper integral, infinite bounds, integrate, integration
Files Tagged by AS View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
03 Dec 2008 Cohen's Kappa (with customizable weightings) A script to calculate Cohen's Kappa with the ability to do customizable weightings. Author: AS cohens kappa, interobserver agreeme... 5 0
12 Sep 2008 Integrate (wrapper for dealing with infinite bounds) A wrapper for quad to deal with inf bounds. Author: AS integration, integrate, improper integral, infinite bounds 4 1
  • 4.0
4.0 | 2 ratings

Contact us