Please consider using the R package systemfit. It has existed for about 10 years, I've used it many times happily :)
I've not used gmm package, I'm not criticizing it. But I have good results from systemfit. It has good documentation. "This package contains functions for fitting simultaneous systems of linear and nonlinear equations using Ordinary Least Squares (OLS), Weighted Least Squares (WLS), Seemingly Unrelated Regressions (SUR), Two-Stage Least Squares (2SLS), Weighted Two-Stage Least Squares (W2SLS), and Three-Stage Least Squares (3SLS)." If that doesn't work for you, please show us your example code, along with the error messages. On Sat, Jun 29, 2013 at 11:18 AM, John Fox <j...@mcmaster.ca> wrote: > Dear Hans-Christian > > > -----Original Message----- > > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > > project.org] On Behalf Of hck > > Sent: Saturday, June 29, 2013 11:19 AM > > To: r-help@r-project.org > > Subject: Re: [R] 2SLS / TSLS / SEM non-linear > > > > The challenge is to firstly calculate the reduced form. As far as I > > know, the > > SEM package does not do this automatically. Am I correct? > > > > Right. If you look at the code in sem:::tsls.default, you'll see that it > formulates and solves the 2SLS estimating equations directly (using a > Cholesky decomposition). Moreover, tsls() is for linear structural > equations. > > Best, > John > > ----------------------------------------------- > John Fox > Senator McMaster Professor of Social Statistics > Department of Sociology > McMaster University > Hamilton, Ontario, Canada > > > > > > > > > > > > -- > > View this message in context: http://r.789695.n4.nabble.com/2SLS-TSLS- > > SEM-non-linear-tp4670123p4670595.html > > Sent from the R help mailing list archive at Nabble.com. > > > > ______________________________________________ > > 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. > > ______________________________________________ > 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. > -- Paul E. Johnson Professor, Political Science Assoc. Director 1541 Lilac Lane, Room 504 Center for Research Methods University of Kansas University of Kansas http://pj.freefaculty.org http://quant.ku.edu [[alternative HTML version deleted]] ______________________________________________ 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.