Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do Multiple Regression with VBA Code
I want to do a multiple regression through VBA code so I want to understand
the code structure. I recorded a macro to do this, using Tools | Data Analysis | Regression, I filled in my Y and X ranges and the cell range to post the results, however the code that resulted did not show any of the ranges in it. When I ran this code it asked me firstly to imput the "Y" range, and when I key this and rerun the macro, a message indicated that the range need to be a "contiguous reference" and I don't know what this means. Can anyone please help me with the line code to do the multiple regression? Thanks KEN |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do Multiple Regression with VBA Code
Contiguous means adjacent. The message suggests your X columns were
not adjacent. For example, with X1 and X2, their being in columns A & B is fine, but A & C is not. Hth, Merjet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do Multiple Regression with VBA Code
WorksheetFunction.LinEst
It is not obvious from Help, but LINEST does multiple regression (the X range must have a column for each estimated parameter other than the intercept). All output from the ATP regression tool is either reformatted from LINEST or calculated from LINEST output. Jerry "Ken" wrote: I want to do a multiple regression through VBA code so I want to understand the code structure. I recorded a macro to do this, using Tools | Data Analysis | Regression, I filled in my Y and X ranges and the cell range to post the results, however the code that resulted did not show any of the ranges in it. When I ran this code it asked me firstly to imput the "Y" range, and when I key this and rerun the macro, a message indicated that the range need to be a "contiguous reference" and I don't know what this means. Can anyone please help me with the line code to do the multiple regression? Thanks KEN |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How does Excel calculate Multiple R when doing multiple regression | Excel Worksheet Functions | |||
The multiple regression tool - linear or non-linear regression? | Excel Discussion (Misc queries) | |||
how to use multiple regression | Excel Discussion (Misc queries) | |||
multiple regression | Excel Worksheet Functions | |||
VBA Code for Logit regression | Excel Programming |