Hi Mark, why do you need that? If your task is to estimate how much your y changes if x change, why not use simple OLS? (Well, right, you should be able to use sampleSelection as well).
It shouldn't probably be hard to compute it -- it is just OLS marginal effect + som kind of derivative of Inverse Mills Ratio. A little more tricky question is, what to do with dummies and factor variables. As Arne told, we are open to incorporate your changes! Best, Ott > Hi Mark! > > On Sun, Jan 3, 2010 at 9:08 PM, Mark Bulling > <mark.bull...@googlemail.com> wrote: >> Hi there >> >> Within sampleSelection, I'm trying to calculate the marginal effects for >> variables that are present in both the selection and outcome models. >> >> For example, age might have a positive effect on probability of >> selection, >> but then a negative effect on the outcome variable. i.e. >> Model<-selection(participation~age, frequency~age, ...) >> >> Documentation elsewhere describes one method for doing this in Stata >> based >> on Sigelman and Zeng: http://polisci.osu.edu/prl/Selection%20Models.pdf >> - >> see page 16. >> >> I'd like to replicate this in r, but wanted to check I'm not reinventing >> the >> wheel, before doing so. > > I don't know a function/method that does this in R. So if you want to > implement this in R, I suggest that you add a "marginalEffects" (or > similar) method for objects of class "selection" to the > "sampleSelection" package. You can get (write) access to the source > code of this package on R-Forge [1]. Please let me (and Ott) know if > you need any assistance. > > [1] http://r-forge.r-project.org/projects/sampleselection/ > > /Arne > > -- > Arne Henningsen > http://www.arne-henningsen.name > ______________________________________________ R-help@r-project.org mailing list 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.