Dear R-friends,
I am trying to use the Zelig library to simulate  the following model:

z.out<-zelig(formula = y ~  x1*x2 + x3 + x4 + x5, model="ls", data = 
my.data, weights = my.weights)

Since the regression is weighted before running the regression I used 
the procedure:

zelig2ls <- function(formula, model, data, M, ...) {
    mf <- match.call(expand.dots = TRUE)
    mf[[1]] <- as.name("ls")
    as.call(mf)
}

but  when I set

x.out<-setx(z.out)

I receive the following error message:

Error in model.frame(formula, rownames, variables, varnames, extras, 
extranames,  :
        variable lengths differ
In addition: Warning message:
There is more than one mode. The first level is selected. in: 
FUN(X[[1]], ...)

Any suggestion is appreciated

Luca

	[[alternative HTML version deleted]]


