I can't see your Mata function -one()- but it is likely to need an
argument (something to feed on). You don't supply one.
More generally, commenting on code errors is difficult without seeing
the precise code or the precise error.
Why don't you just not send your users the do file? Are you writing a do
file that users are expected to use their end but you don't want them to
know what is inside?
Nick
[email protected]
Rasika Raghavan
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?
*
* 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/