Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Programming Stata

From   natasha agarwal <>
Subject   st: Programming Stata
Date   Tue, 16 Aug 2011 13:41:37 +0100

Dear Statalist,

I am trying to write and run a program in Stata. The program I define
is as follows and I save it in the do-file

capture program drop fdi
program fdi, rclass
local x " lnvfdi mfdi"
xtprobit expdum 'x', re
gen double x1b1hat, xb
gen double scale = normalden(x1bhat1)
gen double pe1=scale*_b[lnvfdi]
summarize pe1, meanonly
return scalar ape1=r(mean)
drop x1b1hat scale pe1

When I type fdi, I get an error invalid file name.

Can anyone please help me?

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index