RE: Multiple regressions

*To*: mathgroup at smc.vnet.net*Subject*: [mg74267] RE: [mg74234] Multiple regressions*From*: "David Annetts" <davidannetts at aapt.net.au>*Date*: Thu, 15 Mar 2007 19:15:59 -0500 (EST)*References*: <200703150959.EAA20571@smc.vnet.net>

Hi Clifford, > I have a code that does multiple regressions on a set of > data. Depending on= the size and shape of the data I first > do a regression, look at residuals,= subtract the worst data > point and do the regression again. I've written th= is with a > set of If statements so if the size of the data becomes too > small= the next regression won't be done. This works fine > for a single data set b= ut if I put it into a loop through > multiple data sets then I run into troub= le. For example if > the first data set goes through 5 regressions and the ne= xt > data set only has enough data to go through 2 it takes the > data from the= first data set for the last 3 which I don't > want. How do I clear the data = after each pass through a > data set. I've tried Clear[function1, function2,.= ..etc.]. > I've tried UnSet[values,values]. So the question is once I've > gone= through the loop how do I clear the values so the next > data set through it= is not carried over. This sounds like an issue with your loop indexing. However, it's difficult to be sure, since you haven't posted code that states your problem explicitly. Regards, Dave.

**References**:**Multiple regressions***From:*Clifford Martin <camartin@snet.net>