Dear Statalisters,
It is not rare for me to write Stata programs and face problems like the
one just mentioned below. I will be very grateful for any expert opinion.
Thank you so much for your time.
All the best,
Tiago
*/------------------------------start--------------------------------
capture program drop example
*! example v1. TVP 2008
program define example, rclass byable(recall) sortpreserve
version 9.0
syntax [varlist], LOCI(integer) MEANS(real) SDS(real) ORS(string) K(real)
MODEL(string) pa(string) INCREMENT(real)
scalar n_x = 100000
scalar PREV = "`k'"
scalar affected = PREV*n_x
end
*/------------------------------end--------------------------------
. example, means(100) sds(1) ors(1.2,1.3,1.5) loci(4) k(0.3)
model(genetic_stuff) pa(0.4) increment(0.000001)
type mismatch
r(109);
If I delete the last line:
scalar affected = PREV*n_x
the program works fine.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/