Author |
Topic  |
|
yytsnake
China
Posts |
Posted - 06/27/2005 : 07:04:18 AM
|
Origin Version (7.0 or 7.5): Operating System:windows xp
hello: I want to know how to do a multiple regression like this in origin:
Y=a+a1*x1^2+a2*x2^2+a3*x3^2
thanks! |
|
Thomas M
Germany
Posts |
Posted - 06/28/2005 : 03:38:52 AM
|
Hi,
I have origin 6 but it should work for you too.
Draw your graph and go to the graph-page Menue: Analysis -> Non-linear-fit
In your case it is 3rd grade.
HTH
Thomas |
 |
|
yytsnake
China
Posts |
Posted - 06/28/2005 : 05:18:14 AM
|
Thanks for your reply Thomas M. but the function I want to fit has three independent Var's, not a polynomial function in 3rd grade, could origin draw a gragh with 3 Var's? |
 |
|
Leo_Li
China
Posts |
Posted - 06/28/2005 : 07:35:44 AM
|
For your case, just simply define a new function in "Advanced Fitting Tool". In the Dialogbox, select menu: Function -> New, then: 1. Enter your function name, 2. Check "Use defined parameter names" 3. In parameter names field, enter: a,a1,a2,a3 4. In Independent Var. field, enter: x,s,t 5. In Dependent Var. field, enter: y 6. Finally enter your equation y=a+a1*x^2+a2*s^2+a3*t^2, and click "Save". Once the new function is defined, it can be used to fit your data in the same way as build-in fitting functions.
Please note that x1, x2, x3 are system variables, so they cannot be used as independent variable names.
Leo OriginLab
Edited by - Leo_Li on 06/28/2005 07:44:20 AM |
 |
|
yytsnake
China
Posts |
Posted - 06/29/2005 : 04:33:16 AM
|
thanks Leo_Li,
I did it as what you say, the function can be defined now, but when I use it to do the fit operation, it showed me a message like this "Unable to compile user defined function". Could you give another suggest please?
Edited by - yytsnake on 06/29/2005 04:34:17 AM |
 |
|
easwar
USA
1965 Posts |
Posted - 06/29/2005 : 10:58:58 AM
|
Hi,
The error could be because the function is not using proper C syntax etc - you can bring up Code Builder using the "Edit in Code Builder" button of the NLSF dialog, then click Compile button and see where the error is. If you need more help, please paste the exact function lines you typed in, along with the exact error message. Or contact tech support directly.
Easwar OriginLab
|
 |
|
yytsnake
China
Posts |
Posted - 06/29/2005 : 10:56:18 PM
|
Thanks Easwar, I do it as you said, and found the error is that I missed "Y=" in the equation. This time it worked well.
|
 |
|
|
Topic  |
|
|
|