| T O P I C R E V I E W |
| Atomfried |
Posted - 11/01/2004 : 11:13:19 AM Origin Version (Select Help-->About Origin): 7.0 Operating System: Win XP
Hi,
I have written a script that performs polynomial regressions by calling the stat.pr()-function. The interesting part of it is:
worksheet -a 2; wks.col6.type=4; // Set col(F) as X stat.reset(); // can't see the effect :) stat.pr.order=5; stat.data$=%A_E; // data to be fitted stat.fitxData$=%A_F; stat.fityData$=%A_G; stat.makeX.fitnpts=201; stat.makeX.fitx1=2; stat.makeX.fitx2=4; stat.makeX(); stat.pr();
It works fine, but the result, i.e. the obtained parameters are always the same, no matter what limits (fitx1 and fitx2) I choose. I have the impression, that the script fits the whole curve and then just cuts off the X-values <2 an >4
What did I do wrong?
Roman |
| 1 L A T E S T R E P L I E S (Newest First) |
| Mike Buess |
Posted - 11/01/2004 : 12:44:12 PM Hi Roman,
I have not used the stat object but according to the documentation the stat.makex properties only control the curve that's created from the fit. You should be able to use the MKS1 and MKS2 system variables to limit the range of points in the data set that are fitted...
worksheet -a 2; wks.col6.type=4; // Set col(F) as X stat.reset(); // can't see the effect :) stat.pr.order=5; stat.data$=%A_E; // data to be fitted stat.fitxData$=%A_F; stat.fityData$=%A_G; stat.makeX.fitnpts=201; stat.makeX.fitx1=2; stat.makeX.fitx2=4; MKS1=xindex(2,%A_E); // start fitting with the point at X=2 MKS2=xindex(4,%A_E); // stop fitting with the point at X=4 stat.makeX(); stat.pr();
Mike Buess Origin WebRing Member |
|
|