On Sun, 16 Jan 2011, Allin Cottrell wrote:
On Sun, 16 Jan 2011, Giuseppe Vittucci wrote:
> I replicated the problem simply adding a (now useless) loop in
> the new code:
>
> loop 5000 --progressive
> dataset resample n
>
> #logit regression
> logit A const bid X --quiet
>
> #mean and median Willingness-To-Pay
> matrix x = {X}
> scalar mean_wtp = - ($coeff(const)+(meanc(x)*$coeff[3:
> $ncoeff]))/$coeff(bid)
> scalar median_wtp = - ($coeff(const)+(quantile(x,0.5)*$coeff[3:
> $ncoeff]))/$coeff(bid)
>
> #USELESS NESTED LOOP....
> o = rows(x)
> loop for i = 1...o --quiet
> series s = 0
> endloop
>
> #printing stats on these
> print mean_wtp median_wtp
> #save the coefficients to file
> store wtp.gdt mean_wtp median_wtp
> smpl full
> endloop
Thanks. I can confirm the segfault, and now that I have an example
of the problem this should be fixed fairly quickly.
It turned out that the minimal script to provoke this bug looked
like this:
nulldata 5
loop 2
dataset resample 5
loop 1
series s = 0
endloop
endloop
The problem was specific to the case where an outer loop resamples
the dataset and an inner one defines a series. This should now be
OK in CVS and snapshots.
Allin Cottrell