[R] PEA and APE Tobit
hnlki
annelies.hoebeeck at ugent.Be
Thu Feb 26 09:12:34 CET 2015
Hi,
I estimated a tobit model
tobit.fit<-tobit(y~x,left=0, right=Inf) (library "AER")
or
tobit2.fit<-censReg(y~x, left=0, right=Inf) (library"censReg")
I' have estimated the partial effect at the average as:
pea<-(pnorm((colMeans(x)%*%tobit.fit$coef[-1])/tobit.fit$scale))%*%tobit.fitt$coef[-1]
and the average partial effect as:
ape<-
(length(x[,1]))^(-1)*sum(pnorm((x%*%tobit.fit$coef[-1])/tobit.fit$scale))*tobit.fit$coef[-1]
I guess I did something wrong as
margEff( tobit2.fit) (library("censReg")
gives a different result than my partial effect at the average.
Any ideas about what I did wrong?
I did not find the underlying code of margEff.
Kind regards,
--
View this message in context: http://r.789695.n4.nabble.com/PEA-and-APE-Tobit-tp4703856.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list