How to find and replace in a section of text?

What is the easiest way to change '5' in the following code snippet to 10, 15 and 20?

/* implied VAR(1) estimates */***********************/
b_lr = b_r*(1-(rho^5)*(phi^5))/(1-rho*phi); b_ld = b_d*(1-(rho^5)*(phi^5))/(1-rho*phi); b_ldp = (rho^5)*(phi^5); ident = b_lr-b_ld+b_ldp;
aux1 = -5*b_r*(rho^5)*(phi^(5-1))*(1-rho*phi)+rho*b_r*(1-(rho^5)*(phi^5)); aux2 = -5*b_d*(rho^5)*(phi^(5-1))*(1-rho*phi)+rho*b_d*(1-(rho^5)*(phi^5)); aux3 = (1-rho*phi)^2; aux_br = aux1/aux3; aux_bd = aux2/aux3;
"b_lr"; b_lr; 
"b_ld"; b_ld;
"b_ldp"; b_ldp;
jacob = ((1-(rho^5)*(phi^5))/(1-rho*phi))~0~aux_br|0~((1-(rho^5)*(phi^5))/(1-rho*phi))~aux_bd|0~0~5*(rho^5)*(phi^(5-1)); varcov = jacob*avcovb*jacob'; tstat = (b_lr|b_ld|b_ldp)./sqrt(diag(varcov));

"t-statistics for 5 years horizon coefficients"; tstat;
"R2 for VAR equations"; R2;

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 30 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy