Statalist


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

RE: st: Hiding contents of a do-file


From   Rasika Raghavan <rasikarag@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: Hiding contents of a do-file
Date   Mon, 1 Feb 2010 19:02:40 +0530

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/



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