[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: A simple program with a weird behavior

Subject   st: A simple program with a weird behavior
Date   Mon, 7 Jul 2008 12:21:49 -0300 (BRT)

Thank you very much to Ulrich, Philippe and Eva for their highly helpful
tips/comments on my problem!




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,



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



. 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

If I delete the last line:

scalar affected =  PREV*n_x

the program works fine.

*   For searches and help try:

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