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: nlcom

From   Olivia Bacha <>
Subject   st: nlcom
Date   Mon, 14 Jun 2010 01:14:30 -0300

Dear all,

I am running the following code after logit estimation using nlcom,
this is to estimate marginal effects.

quietly sum gastos
local gastosM= r(mean)

quietly sum var60
local var60M= r(mean)

quietly sum gastopc
local gastopcM= r(mean)

quietly sum gastopcreeleição
local gastopcreeleiçãoM=r(mean)

quietly sum Idade
local IdadeM=r(mean)

quietly sum qualidade
local qualidadeM=r(mean)

quietly sum qtpart
local qtpartM=r(mean)

quietly sum educ
local educM=r(mean)

local xb1 _b[prop_gasto]*(`gastosM'/`var60M') + _b[gastopc]*`gastopcM'
+ _b[reeleição] + _b[gastopcreeleição]*`gastopcreeleiçãoM' +
_b[Idade]*`IdadeM' + _b[qualidade]*`qualidadeM' + _b[qtpart]*`qtpartM'
+ _b[educ]*`educM'

local xb0 _b[prop_gasto]*(`gastosM'/`var60M') + _b[gastopc]*`gastopcM'
+ _b[Idade]*`IdadeM' + _b[qualidade]*`qualidadeM' +
_b[qtpart]*`qtpartM' + _b[educ]*`educM'

nlcom (a1:(1/(1+ exp(`xb1')))^2) (a2:(`var60M' - `gastosM')/`var60M'^2), post

nlcom _b[a1] * _b[prop_gasto] * _b[a2]

nlcom (-1) * ((1/(1+ exp(`xb0'))) ^2) * _b[prop_gasto] * (`var60M' -

 nlcom ((1/(1+ exp(xb1))) ^2) * _b[prop_gasto] * (1/`var60M')^2 * `gastosM'

Stata is returning error 198 when i start using nlcom. What's my mistake?

Thank you very much in advance.



*   For searches and help try:

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