1

I am trying to estimate the following model. My objective is to calculate confidence interval of the random parameters.

variation.model1 =lmer(sales ~ 1+age+value_added+net_worth+(1+net_worth|industry:id)+
                           (1+net_worth|industry), 
                       data=data_file, 
                       control = lmerControl(calc.derivs = FALSE), 
                       REML=T, na.action=na.omit)

I got the following errors.

confint(variation.model1, which="theta_")

Error in profile.merMod(object, which = parm, signames = oldNames, ...) formal argument "which" matched by multiple actual arguments

confint(variation.model1)

Error in fn(x, ...) : Downdated VtV is not positive definite In addition: There were 50 or more warnings (use warnings() to see the first 50)

What should I do with this type of problem?

My data structure: industry id year Sales age value_added net_worth 1 1 1 0 1.017 3.93 14.0 12.9 2 1 2 0 -0.780 3.90 13.2 13.1 3 1 2 3 -0.402 3.90 13.2 11.6 4 1 3 0 0.722 3.69 14.4 14.5 5 1 3 2 1.437 3.69 14.4 13.2 6 1 3 4 1.545 3.69 14.4 13.9

Sorry for unreadable data.

In addition, I also tried using lme. I got the following error message for

diag(variation.model1$apVar)

Error in diag(variation.model2$apVar) :
invalid 'nrow' value (too large or NA)

In addition: Warning message: In diag(variation.model2$apVar) : NAs introduced by coercion

mjalam
  • 29
  • 4
  • Check out [How to make a great R reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – Therkel Jun 16 '16 at 07:00

1 Answers1

2

1) confint does not have an argument which - if you only want confidence intervals of certain parameters use parm.

confint(variation.model1, parm="theta_")

2) Your second problem I could not reproduce with my data and since I do not know what your variables are, a guess is going to be a blow in the wind. But perhaps your question is already answered here: Error message: Error in fn(x, ...) : Downdated VtV is not positive definite

Community
  • 1
  • 1
Therkel
  • 1,379
  • 1
  • 16
  • 31
  • Thanks for your help for the first problem. I could not figure out the second problem. I have read that link before. I add the data structure. In addition, I add more information about this problem. – mjalam Jun 17 '16 at 01:00