Hey there,
I have two arrays of data on which I would like to be able to run a polynomial regression in VBA.
However, when write the following in VBA:
I get a compile error, as {} are not valid characters. I've tried substituting parenthesis and leaving the brackets out completely, but that does not work either.
Anyone know how to perform a polynomial regression in VBA?
Working with two ranges of cells in a worksheet, the Linest function works just fine. ie, =LINEST(H18:H34, G18:G34^{1,2,3}), so I don't know why it would not be the same in VBA.
Office 2007
I have two arrays of data on which I would like to be able to run a polynomial regression in VBA.
However, when write the following in VBA:
Code:
Dim poly_3 as Variant
Dim arr1 as Variant
Dim arr2 as Variant
poly_3 = WorksheetFunction.LinEst(arr1, my_arr2 ^ {1, 2, 3})
I get a compile error, as {} are not valid characters. I've tried substituting parenthesis and leaving the brackets out completely, but that does not work either.
Anyone know how to perform a polynomial regression in VBA?
Working with two ranges of cells in a worksheet, the Linest function works just fine. ie, =LINEST(H18:H34, G18:G34^{1,2,3}), so I don't know why it would not be the same in VBA.
Office 2007