[R] PEA and APE Tobit
hnlki
annelies.hoebeeck at ugent.Be
Thu Feb 26 23:28:50 CET 2015
Dear Mr Henningsen,
I have read the posting guide but apparently not well enough. I didn't find how to include R code in my post. I'll read it again and I'll try to give a clearer example.
Sorry for the inconvenience.
Kind regards,
Annelies
> Op 26-feb.-2015 om 21:59 heeft Arne Henningsen-3 [via R] <ml-node+s789695n4703915h77 at n4.nabble.com> het volgende geschreven:
>
> Dear Annelies
>
> On 26 February 2015 at 09:12, hnlki <[hidden email]> 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
>
> ______________________________________________
> [hidden email] 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.
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://r.789695.n4.nabble.com/PEA-and-APE-Tobit-tp4703856p4703915.html
> To unsubscribe from PEA and APE Tobit, click here.
> NAML
--
View this message in context: http://r.789695.n4.nabble.com/PEA-and-APE-Tobit-tp4703856p4703919.html
Sent from the R help mailing list archive at Nabble.com.
[[alternative HTML version deleted]]
More information about the R-help
mailing list