R/objectiveGLS.R

# last modified 2012-01-06 by J. Fox
# Modified for Compiled code in C/C++ by Zhenghua Nie.

objectiveGLS <- function (gradient = FALSE) 
{
    result <- list(objective = function(par, model.description) {
        with(model.description, {
						 
						 res <- CompiledObjective(par=par, model.description=model.description, objective="objectiveGLS", gradient=gradient) 
				
						 f <- res$f
				     C <- res$C
				     A <- res$A
				     P <- res$P

            attributes(f) <- list(C = C, A = A, P = P)
            f
        }
				)
    }
		)
    class(result) <- "semObjective"
    result
}

Try the sem package in your browser

Any scripts or data that you put into this service are public.

sem documentation built on April 11, 2022, 1:06 a.m.