On Thu, 26 Apr 2012, Riccardo (Jack) Lucchetti wrote: > on Wed, 25 Apr 2012, Henrique Andrade wrote: > >> matrix teste_t = $coeff./$stderr >> matrix roots = $["roots"] >> if abs(teste_t)>critical(t, $T, 0.025) && abs(roots[,1])>1 > > What do you want to do here, exactly? "teste_t" is a matrix, so its absolute > value is a matrix too. How can you base an "if" condition on a > multiple-valued object?
You can actually do that, but (as I think Jack is implying) you have to be careful what you intend. In this case the "if" condition will evaluate as true if and only if _every_ element of the matrix teste_t exceeds the two-sided 5% critical value of the student t distribution -- that is, iff every arima coefficient is "significant". One can run this several times to see what I mean: <hansl> atrix m = mnormal(4,1) m scalar test = 0 if m > test print "yes" else print "no" endif </hansl> Allin Cottrell
