Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Hiding contents of a do-file


From   Rasika Raghavan <[email protected]>
To   [email protected]
Subject   Re: st: Hiding contents of a do-file
Date   Mon, 1 Feb 2010 18:02:33 +0530

All,

This is part of the code which I need to encrypt. I need to encrypt
the replace command in the forvalues loop.

use temp1, clear
merge using temp2
drop _merge
gen score=.
forvalues i=6(1)19 {
replace score = rss*coeff_rss_`i'[1] + db_tb*coeff_db_tb_`i'[1] +
remw*coeff_remw_`i'[1] + maxp*coeff_maxp_`i'[1] +
d_fifty*coeff_d_fifty_`i'[1] if overno==`i'
}
save model, replace

I encrypted the "replace score=..." command and save it as one.mo as
mentioned in the thread.

If I run the do-file now as:
use temp1, clear
merge using temp2
drop _merge
gen score=.
forvalues i=6(1)19 {
mata:one()
}
save model, replace

it is showing an error. I am not much familiar with Mata, so is there
a way around this?

Regards,

Rasika
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index