The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 multiple regression
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

yytsnake

China
Posts

Posted - 06/27/2005 :  07:04:18 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

yytsnake

China
Posts

Posted - 06/28/2005 :  05:18:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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?
Go to Top of Page

Leo_Li

China
Posts

Posted - 06/28/2005 :  07:35:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

yytsnake

China
Posts

Posted - 06/29/2005 :  04:33:16 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

easwar

USA
1965 Posts

Posted - 06/29/2005 :  10:58:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Go to Top of Page

yytsnake

China
Posts

Posted - 06/29/2005 :  10:56:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000