SCM

SCM Repository

[matrix] Diff of /branches/trunk-lme4/R/lmeRep.R
ViewVC logotype

Diff of /branches/trunk-lme4/R/lmeRep.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 362, Sun Dec 5 13:46:51 2004 UTC revision 380, Sat Dec 11 13:50:17 2004 UTC
# Line 52  Line 52 
52                       ccoef(x) <- pars                       ccoef(x) <- pars
53                       deviance(x, REML = value$REML)                       deviance(x, REML = value$REML)
54                   }                   }
55                   gr <- function(pars) {                   gr <- if (value$analyticGradient)
56                         function(pars) {
57                       ccoef(x) <- pars                       ccoef(x) <- pars
58                       grad <- lme4:::gradient(x, REML = value$REML, unconst = TRUE)                       grad <- lme4:::gradient(x, REML = value$REML, unconst = TRUE)
59                       grad[constr] <- -grad[constr]/pars[constr]                       grad[constr] <- -grad[constr]/pars[constr]
60                       grad                       grad
61                   }                       } else NULL
62                   optimRes <- optim(st, fn, gr,                   optimRes <- optim(st, fn, gr,
63                                     method = "L-BFGS-B",                                     method = "L-BFGS-B",
64                                     lower = ifelse(constr, 1e-10, -Inf),                                     lower = ifelse(constr, 1e-10, -Inf),

Legend:
Removed from v.362  
changed lines
  Added in v.380

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge