Dear Annelies On 26 February 2015 at 09:12, hnlki <annelies.hoebe...@ugent.be> wrote: > 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.
[...] > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. Please follow the posting guide and provide a self-contained reproducible example. Best regards, Arne -- Arne Henningsen http://www.arne-henningsen.name ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.