Re: Multiple regressions

*To*: mathgroup at smc.vnet.net*Subject*: [mg74272] Re: Multiple regressions*From*: dh <dh at metrohm.ch>*Date*: Thu, 15 Mar 2007 19:18:42 -0500 (EST)*References*: <etb5lk$ke6$1@smc.vnet.net>

Hi Cliff, it is hard to help you if you do not post a simple example. I think your problem comes because you attack your task in an inapropriate way. There should be no need to clear anything. Assume you have a function evaluate[data_] and the data in dat1,dat2.., you would call evaluate[dat1] e.t.c. On the other hand, if you did not declare a function, but work with a variable dat, you would copy your data into dat: dat=dat1, evaulate dat1, dat=dat2, evaulate dat2 e.t.c. Daniel Clifford Martin wrote: > Hi Group, > > 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. > > Thanks for any help. > > Cliff >