Home forums Mixed Models cl causes an error when passing weights variable

Viewing 1 reply thread
  • Author
    Posts
    • #391
      S McIntyre
      Participant

      Thanks for adding the cl parameter to mixed(), very nice! However, it seems to cause some problems when passing the ‘weights’ parameter. This causes an error, stopping immediately:

      > mixed(F1 ~ cued + (1 + cued|pair),
      +       family=binomial, weights=wt,
      +       method='PB', args_test = list(nsim =10, cl = cl),
      +       data = performance.expt2, cl = cl)
      Fitting 2 (g)lmer() models.
      Error in checkForRemoteErrors(val) : 
        2 nodes produced errors; first error: object 'wt' not found

      Whereas this seems to run ok (albeit convergence warnings):

      > mixed(F1 ~ cued + (1 + cued|pair),
      +       family=binomial, weights=wt,
      +       method='PB', args_test = list(nsim =10, cl = cl),
      +       data = performance.expt2)
      Fitting 2 (g)lmer() models:
      [..]
      Obtaining 1 p-values:
      [.]
      Warning messages:
      1: In eval(family$initialize, rho) :
        non-integer #successes in a binomial glm!
      2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
        Model failed to converge with max|grad| = 0.0127221 (tol = 0.001, component 1)
      3: In eval(family$initialize, rho) :
        non-integer #successes in a binomial glm!
      4: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
        Model failed to converge with max|grad| = 0.00420134 (tol = 0.001, component 1)

      Any idea what’s going on? (note, nsim=10 is just for troubleshooting)

      • This topic was modified 2 months, 4 weeks ago by S McIntyre.
    • #394
      henrik
      Keymaster

      Sorry for the slow reply. Can you try using weights = performance.expt2$wt?

      If this still gives an error you might have to export performance.expt2 to cl first: clusterExport(cl, "performance.expt2")

Viewing 1 reply thread
  • You must be logged in to reply to this topic.