Search found 11 matches

by Aaron
Tue Apr 29, 2014 2:44 pm
Forum: Help With Programming
Topic: code issue
Replies: 2
Views: 5472

Re: code issue

Yes, it works now. Thank you very much. :D
by Aaron
Tue Apr 29, 2014 10:08 am
Forum: Help With Programming
Topic: code issue
Replies: 2
Views: 5472

code issue

Dear All, I do not understand why I have an error from the following code: ---------------------------------------------------- all 100 com size = 100 com sigu=1; com k =2 com dxa = sigu*%ranmat(size,k); *dis dxa com x = %zeros(size,k); *dis x do aa=1, size com dxaa = %xsubmat(dxa,1,aa,1,k) com dxaa...
by Aaron
Wed Jan 22, 2014 11:15 am
Forum: Help With Programming
Topic: replacing an element in a matrix
Replies: 1
Views: 6533

replacing an element in a matrix

Dear All Could you look at the following code and resolve the error that I have? ******* com jjj0 = %seqa(1,1,tm); dis jjj0 com bandw = 7.16326 com jb = jjj0/bandw; dis jb; com jb0 = jb do a = 1, %rows(jb) if %scalar(%xsubmat(jb,a,a,1,1)) <= .5; com jb0 = %fill(a,1,1) else com jb0 = %fill(a,1,0) end...
by Aaron
Tue Jan 21, 2014 3:32 pm
Forum: Help With Programming
Topic: Comparing matrix and integer
Replies: 2
Views: 5462

Re: Comparing matrix and integer

Dear Tom,

Many thanks for your help. I resolved the issue in the following way:

com hhh = %scalar(2.6614*((a2*te).^0.2));dis hhh
com bandw = %min(hhh,te-2); dis bandw

sincerely,


Aaron
by Aaron
Fri Jan 17, 2014 2:27 pm
Forum: Help With Programming
Topic: Comparing matrix and integer
Replies: 2
Views: 5462

Comparing matrix and integer

Dear All, I need to compare 1 by 1 matrix and an integer value. com te = 10 com bandw0 = 2.6614*((a2*te).^0.2); *This bandw is defined as RECTANGULAR[REAL], but the dimension is 1 by 1. if bandw0 .ge. te-2 com bandw = te-2 else com bandw = bandw0 The second line of this program gives me an error mes...
by Aaron
Thu Jan 16, 2014 10:44 am
Forum: Help With Programming
Topic: power of a number
Replies: 1
Views: 4360

power of a number

Dear All,


Could you help me to compute 100^(0.2)? That is,

com aaa = 100^(0.2); dis aaa

this doesn't work. How can I get the power of a number less than one? Thank you.

Sincerely,

Aaron
by Aaron
Tue Jan 14, 2014 1:37 pm
Forum: Help With Programming
Topic: differences in variable(i)
Replies: 2
Views: 5528

Re: differences in variable(i)

Dear Tom,

Thank you very much for your help. I am also looking at the procedure.

Sincerely,

Aaron
by Aaron
Tue Jan 14, 2014 11:02 am
Forum: Help With Programming
Topic: differences in variable(i)
Replies: 2
Views: 5528

differences in variable(i)

Dear All, I am writing a code to estimate a threshold cointegration model. In the below code, "thresh_test(i)" creates an error. If just a series from the attached data set used, for example r_10, the program works. What is the problem? How can I resolve this issue? Thank you very much. :D...
by Aaron
Sat Nov 09, 2013 5:17 am
Forum: Data: Reading, Writing, Transforming
Topic: converting vectors to a matrix
Replies: 2
Views: 5838

Re: converting vectors to a matrix

I understand it now. Thank you very much!
by Aaron
Fri Nov 08, 2013 3:44 pm
Forum: Data: Reading, Writing, Transforming
Topic: converting vectors to a matrix
Replies: 2
Views: 5838

converting vectors to a matrix

Dear All, I would like to create a matrix and get a sub matrix from it. For example -------------- all 10 open data c:\temp\sample_1.xls calendar(m) 1987:2 data(format=xls,org=obs) 1987:2 1987:11 E1 E2 com e = ||e1|e2|| pri / e com a = %dims(e) dis a com ee = %xsubmat(e,1,2,1,2) --------------- I ge...
by Aaron
Thu Nov 07, 2013 3:05 pm
Forum: Help With Programming
Topic: long run variance matrix used in Hansen (1995)
Replies: 1
Views: 5180

long run variance matrix used in Hansen (1995)

Dear All,

Could you let me know how to estimate long run variance matrix in equation 17 in the attached paper?
I wonder whether we can estimate this in convenient way by using %cmon. Thank you very much for your help.

Best,

Aaron