Hi experts, I just started to learn R today, and tried to work with an add-on package sem. I have a version of 2.3.1 on MacOS X 10.4.6 with sem put under /Library/Frameworks/R.framework/Versions/2.3/Resources/library However when I typed library(sem) the following error showed up: Error in library(sem) : 'sem' is not a valid package -- installed < 2.0.0? Why is this? Thank you, Gang Chen [[alternative HTML version deleted]]
Gang Chen wrote:> Hi experts, > > I just started to learn R today, and tried to work with an add-on > package sem. I have a version of 2.3.1 on MacOS X 10.4.6 with sem put > under /Library/Frameworks/R.framework/Versions/2.3/Resources/library > > However when I typed > > library(sem) > > the following error showed up: > > Error in library(sem) : 'sem' is not a valid package -- installed < > 2.0.0?Please read the R Installation and Administration manual on how to install packages (e.g. with R CMD INTALL in the OS' console or install.packages() in R) Uwe Ligges> Why is this? > > Thank you, > Gang Chen > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Dear Gang Chen, I expect that either you didn't install the package properly (see ?install.packages) or installed a version of the package for an earlier version of R. I hope this helps, John On Wed, 28 Jun 2006 17:14:10 -0400 Gang Chen <gangchen at mail.nih.gov> wrote:> Hi experts, > > I just started to learn R today, and tried to work with an add-on > package sem. I have a version of 2.3.1 on MacOS X 10.4.6 with sem put > > under /Library/Frameworks/R.framework/Versions/2.3/Resources/library > > However when I typed > > library(sem) > > the following error showed up: > > Error in library(sem) : 'sem' is not a valid package -- installed < > 2.0.0? > > Why is this? > > Thank you, > Gang Chen > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html-------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox/
Dear Gang, I'm not clear about the form of the model that you're trying to fit, nor what the form of the likelihood would be for such as model, but the short answer is that sem() requires that each covariance among observed variables be for the same observations and hence for the same number (N) of observations. BTW, I didn't respond to your query to r-help because I was out of town and unable to read email. Regards, John On Mon, 10 Jul 2006 11:36:06 -0400 Gang Chen <gangchen at mail.nih.gov> wrote:> Hi Dr. Fox, > > I posted the following message to the R e-mail list, but didn't get > any response. I was wondering whether you could shed some light on > my problem. > > Thank you very much. > > Gang > > ==> > From: p_connolly at ihug.co.nz > Subject: Re: [R] Package sem > Date: July 9, 2006 5:49:41 PM EDT > To: gangchen at mail.nih.gov > > Hi, > > I am trying to run some path analysis with Dr. Fox's sem package. The > number N in sem(ram, S, N) is supposed to be the total number of > observations, right? However, in my situation the effective number of > degrees of freedom for each observed variable is estimated by some > auto-regression process, thus each variable bears a different DF. Is > there a way I could run such a path analysis with a vector of DF's in > sem? > > Thanks, > Gang >-------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox/