View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
John Coleman John Coleman is offline
external usenet poster
 
Posts: 274
Default Regression in VBA


Noah wrote:
I am interested in running a regression in vba, but I don't know what the
arguments are in the function. I tried looking in VB help and in the
discussion groups, but couldn't find anything where all of the arguments are
spelled out. Can anyone help me with what all of the arguments are with the
function:

Application.Run "ATPVBAEN.XLA!Regress", , , False, False, , ActiveSheet _
.Range("$A$1"), False, False, False, False, , False

Thanks!
Noah


You could try turning on the macro-recorder while running the
regression tool and seeing what happens. In particular, look at the
code with the default and then see what happens when you change one of
the parameters. It wouldn't be surprising if the order of the
parameters in the function call mirrors the tab order in the form
and/or the order in which the options are explained in the help. For
example, the last False might refer to generating normal probability
plots.

There is a (quite good) book called "Microsoft Excel VBA: Professional
Projects" by Duane Birnbaum. It has a chapter on using Excel for curve
fitting and scientific data analysis. I don't know if he addresses how
to use ATPVBAEN there. I'll check when I get to work and can see my
copy.

Hope that helps

-John Coleman