Re: [R] sem & testing multiple hypotheses with BIC

From: jebyrnes <>
Date: Fri, 15 Aug 2008 14:31:00 -0700 (PDT)

Not that I know of. However, remember, the RAM format is just a matrix. It's fairly simple to write some code to scan through and make changes to models. For example, here's something to delete a specified path. It should be fairly simple to run through a set of paths, delete them piecewise, fit the model, and then get a BIC (or other information criterion) to create a BIC table. Then again, those wouldn't be a priori models, and might violate some of the spirit of using information criteria...

delete.model.element<-function (delete.text, old.model,"path") {

	#determine what sort of model element we'll be evaluating
	if(col.index==0) stop("Cannot delete a ",

	#blank vectors to start with

	#purge spaces from delete.text
	for (line.num in 1:length(old.model[,1])){
		#purge spaces from the relevant line, just in case this is a path
		old.model[line.num, col.index]<-strip.white(old.model[line.num,
		#see if this is a line to be deleted
		if(!(delete.text old.model[line.num, col.index])){
	#now turn the columns into a RAM model
	ram<-cbind(col1, col2, col3)


Donald Braman-2 wrote:
> I'm coming from the AMOS world and am wondering if there is a simple
> way to do multiple hypothesis testing in the manner of BIC analyses in
> AMOS using the sem package in R. I've read the documentation, but
> don't see anything in there except for basic BIC scores. Perhaps
> someone has devised a simple way to compare the relative likelihood of
> all possible path-fittings within a specified set of paths?

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 15 Aug 2008 - 22:01:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 15 Aug 2008 - 22:33:46 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive