Nick,
This would be the way I created one.mo
mata:
string scalar encode(string scalar pt)
{
return(char(ascii(pt):+1))
}
string scalar decode(string scalar et)
{
return(char(ascii(et):-1))
}
encode ("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'")
mata mosave decode,replace
void one()
{
stata(decode("sfqmbdf!tdpsf!>!stt+dpfgg`stt`\2^!,!ec`uc+dpfgg`ec`uc`\2^!,sfnx+dpfgg`sfnx`\2^!,!nbyq+dpfgg`nbyq`\2^!,e`gjguz+dpfgg`e`gjguz`\2^!jg!pwfsop>>"))
}
mata mosave one,replace
This is the error that I am getting,
coeff_rss_ ambiguous abbreviation
stata(): 3598 Stata returned error
one(): - function returned error
<istmt>: - function returned error
r(3598);
And yes, I want the user to be just able to see the output generated
and not the way it was generated. If I send them the full do-file,
then they are free to do their own analysis, and which would leave me
redundant. Certain issues prevent me from running the do-file myself
and sending across just the output.
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/