Dear Champak Ishram, It's not surprising that what you did doesn't work because the model specification and the arguments that you employed bear no relationship that I can discern to the sem() function in the sem() package.
I think that you're probably confusing the sem package with something else. I hope this helps, John ------------------------------------------------ John Fox Sen. William McMaster Prof. of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox/ On Tue, 23 Apr 2013 12:44:11 +1200 Champak Ishram <champak.ish...@gmail.com> wrote: > Dear R users/developers > I requested help to solve the problem of formulating Multivariate Sample > selection model by using Full Information Maximum Likelihood > (FIML)estimation method. I could not get any response. I formulated the > following code of FIML to analyse univariate sample selection problem. > Would you please advise me where is my problem > > library (sem) > library(nrmlepln) > > Selection equation > ws = c(w1, w2, w3) > > # values of dependent variables in selection equations are binary (1 and 0) > zs = c(z1, z2, z3, z4, z5) > # z1, z2, z3 continuous and z4 and z5 dummies explanatory variables in > selection equation > > Level equation (extent of particular option use) > ys = c(y1, y2, y3) > # values of dependent variables are percentage with some zero cases > xs = c(x1, x2, x3, x4, x5) > # x1, x2, x3 continuous and x4 and x5 dummies dependent variables. > > #Note: The variables in both selection and level equations are mostly same. > > > #Selection model > > models1 = 'w1 ~ 1 + zs' > > # Level model > model1 = 'w1 ~ 1 + zs|y1 ~ 1 + xs' > > fit.fiml = sem(model1, data=MyRdata, estimator="Fiml") # not sure "ML" or > "Fiml" > summary(fit.fiml) > > I greatly appreciate your help. > > Advance thank you. > Regards > Champak Ishram > > [[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. ______________________________________________ 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.