Search found 2 matches
- Mon Mar 19, 2018 7:49 am
- Forum: Programming
- Topic: Code for estimating equation for different values of a certain variable and storing residuals
- Replies: 2
- Views: 2695
Re: Code for estimating equation for different values of a certain variable and storing residuals
So far I have done this vector v = @convert(z) vector v1 = @sort (v,"a","i") 'set buffer on either side of sample !j=11 for !i=!j to v1.@rows-!j equation eq{!i}.ls y = c(1) + c(2)*x*(z<(v1(!i))) + c(3)*x*(z(-1)>=(v1(!i))) eq{!i}.makeresids res{!i} next its working :D
- Mon Mar 19, 2018 12:41 am
- Forum: Programming
- Topic: Code for estimating equation for different values of a certain variable and storing residuals
- Replies: 2
- Views: 2695
Code for estimating equation for different values of a certain variable and storing residuals
Hello! I am estimating a threshold model of the form: y = c + a*x(z<theta) + b*x(z>=theta) where z lowest value< theta <z highest value what I want to do is to estimate this model for all values of "z" variable starting from the lowest value to the highest value, and storing the SSR of eac...
