Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Regression in VBA

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Regression in VBA

Hi Noah,

AFAIK, there is no REGRESS function in Analysis Toolpak.
BTW, if you have ATPVBAEN checked in Add-ins, you can use its functions in
VBA without the preceding filename.

For regression, look in he

http://office.microsoft.com/en-us/as...119631033.aspx

--
Kind regards,

Niek Otten

"Noah" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default Regression in VBA


John Coleman wrote:
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


A better idea: If you add a reference to atbvaen.xls (tools
-references in the editor) then when you type regress( in the editor a
list of the named parameters appears, most of which are either
self-explanatory or make sense upon comparison with the regression
form.

From the object browser:


Sub Regress(inpyrng, [inpxrng], [constant], [labels], [confid],
[soutrng], [residuals], [sresiduals], [rplots], [lplots], [routrng],
[nplots], [poutrng])
Member of atpvbaen.xls.VBA Functions and Subs
Perform multiple linear regression analysis


Hope that helps a bit more.

-John Coleman

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The multiple regression tool - linear or non-linear regression? Statistical interest Excel Discussion (Misc queries) 2 February 6th 08 11:01 PM
regression AudreyJ Excel Discussion (Misc queries) 4 October 4th 06 10:37 PM
regression swissforestry Excel Worksheet Functions 1 November 10th 05 11:59 PM
Regression Jerry W. Lewis Excel Programming 1 August 11th 05 03:11 PM
Regression Ubirajara Augusto Excel Programming 6 June 1st 05 10:36 PM


All times are GMT +1. The time now is 03:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"