Statalist The Stata Listserver

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

st: RE: simulation

From   "Maarten Buis" <>
To   "azam alavi" <>
Subject   st: RE: simulation
Date   Tue, 30 May 2006 10:25:51 +0200

--- azam alavi wrote:
> I saw your recommanded program for my simulation.
> I did your program on nlsw88.dta but when doing 
> gen p1 = norm((_b[/cut1]-`i')-xb), stata shows 
> "invalid syntax" and I can't figure out what's
> wrong.

Stata 8 and Stata 9 use different names for the 
cut-off values, and using my code for Stata 8 
(or less) would result in such an error message. 
So I assume you are not using Stata 9. In that 
case replace _b[/cut1], _b[/cut2], and _b[/cut3] 
by _b[_cut1], _b[_cut2], and _b[_cut3]. Let me 
know if that solves the problem.

In addition note that there are some long lines 
in my example code in which mailers might add 
hard returns. In particular -di "shift " 
round(`i', .1) " to the left results in mean 
education of " r(mean)- and -twoway line meaned2 
meaned1, xtitle("shift to the left") 
ytitle("mean education")- are two long commands 
that should appear in your do-file editor on one 

I've also cc-ed this answer to the statalist 
since this changing of names between Stata 
versions might have also confused others on the 


Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214 

+31 20 5986715

*   For searches and help try:

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