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 for Programming
 LabTalk 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

MicheleFerrari

Germany
Posts

Posted - 10/25/2005 :  08:48:31 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have some problems with my labtalk script doing multiple regression with the stat object.
My worksheet "Data1" includes 3 columns (p,b,c) with 18 rows. I would like to perform a multiple regression with "p" as dependent and "b" and "c" as independent variables with the following labtalk script:

stat.reset(); //Reset the DLL
stat.mr.YData$=Data1_p; //dependent variable
stat.mr.xData1$=Data1_b; //indep. variable b
stat.mr.xData2$=Data1_c; //indep. variable c
stat.mr();
//for the output some parameters
stat.mr.NumX=;
stat.MR.B1=; //parameter b1
stat.MR.B2=; //parameter b2
stat.SSR=; //y-intercept

Although multiple regression via menu (statistics-->multiple regression) gives the results (y-intercept = 917.8; b=-1.65; c=1.01 etc.), my labtalk script indicates all parameters = 0 (stat.MR.a, stat.MR.B1, stat.MR.B2), except the stat.mr.NumX = 2 (corresponding to the total number of X columns).
Could anyone help me with the script and tell me whats wrong?

Origin Version (Select Help-->About Origin): 7.5
Operating System: WIN2000

Hideo Fujii

USA
1582 Posts

Posted - 10/25/2005 :  5:19:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Michele,

Try to replace the 2-4th lines to:

stat.worksheet$=Data1;
stat.mr.YData$=P; //dependent variable
stat.mr.xData1$=b; //indep. variable b
stat.mr.xData2$=c; //indep. variable c

Hope this works okay.

--Hideo Fujii
OriginLab

Go to Top of Page

MicheleFerrari

Germany
Posts

Posted - 10/26/2005 :  02:36:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Indeed it works! Thought I had already tried this out, but seems not to be the case.
Thank you very much!
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