[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: how to speed up multiple regressions?*From*: Charlotte DeMott <demott(at)atmos.colostate.edu>*Date*: Mon, 30 Apr 2001 13:48:01 -0600*Newsgroups*: comp.lang.idl-pvwave*References*: <3AED9E52.DD89C5D5@atmos.colostate.edu> <onzocytev9.fsf@cow.physics.wisc.edu>*Reply-To*: demott(at)atmos.colostate.edu*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:24756

Hi Craig, Thanks for taking a look. I was hoping someone would point out to me a very obvious blunder I was making. I had high hopes upon reading your message, but I think I'm sticking all of this in a loop to compute the significance because datadof is NOT a constant for all points in my array. In the first loop I included in the original post, data_tau is the decorrelation timescale at each data point which is, unfortunately, not constant. T_CVF, as you indicated, requires the 2nd argument (datadof in my case) to be a scalar. My problem is that datadof isn't the same for all data points. However, your post make me realize that I can do the regression in a slightly different way that will eliminate this problem, and save me loads of time. So while your suggestion wasn't the fix I was looking for, it jarred my tired brain enough to think of another work-around. So thanks! Charlotte Craig Markwardt wrote: > I've only looked at the second section, the part you thought was too > slow. Here is my take on the situation: > > datadof = float(big_count)/data_tau ;; DOF's are a scalar! > tval = t_cvf(0.1, datadof) ;; Student's T value, computed once > > data_t = abs(datar*sqrt(datadof))/sqrt(1-datar*2) > datcomp = dataf(*,*,*,0) + dataf(*,*,*,1)*tsval > data_sig = datar*sqrt(datadof)/sqrt(1-datar*2) GT tval > > You may be able to vectorize the first part a little better, but I'll > leave that to you. > > Craig > > -- > -------------------------------------------------------------------------- > Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu > Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response > --------------------------------------------------------------------------

**Follow-Ups**:**Re: how to speed up multiple regressions?***From:*Craig Markwardt

**References**:**how to speed up multiple regressions?***From:*Charlotte DeMott

**Re: how to speed up multiple regressions?***From:*Craig Markwardt

- Prev by Date:
**% Loop limit expression too large for loop variable type.** - Next by Date:
**Re: how to speed up multiple regressions?** - Prev by thread:
**Re: how to speed up multiple regressions?** - Next by thread:
**Re: how to speed up multiple regressions?** - Index(es):