T O P I C R E V I E W |
MicheleFerrari |
Posted - 10/25/2005 : 08:48:31 AM 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 |
2 L A T E S T R E P L I E S (Newest First) |
MicheleFerrari |
Posted - 10/26/2005 : 02:36:47 AM Indeed it works! Thought I had already tried this out, but seems not to be the case. Thank you very much! |
Hideo Fujii |
Posted - 10/25/2005 : 5:19:34 PM 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
|
|
|