Question:

Do you know what might be the problem, and why stata does not recognizes apples as 10 groups and instead sees them as 6080 different observations?

Thank you in advance!
Andreea


Background:
We have our data in long format where:
  • we have 10 repeated observations per participant.
  • In total we have 608 participants (6080 rows)
  • PL: purchase likelihood (dependent variable (per apple))
  • Ia: implicit attitude score (per participant) (explanatory var.)
  • Ea: explicit attitude score (per apple) (explanatory var.)
Data for one participant.
id PL ia ea apple
85 1 1,29 1,33 10
85 1 1,29 1,00 6
85 1 1,29 1,17 7
85 7 1,29 9,83 1
85 1 1,29 1,00 8
85 7 1,29 10,33 2
85 7 1,29 9,17 3
85 1 1,29 1,00 9
85 5 1,29 7,17 5
85 7 1,29 10,67 4
We want to model purchase likelihood where ea and ia are fixed and we have random intercepts by id and apple.

Our code is stata looks like this:
meologit PL ea ia ea##ia || id: || apple:

The way our dataset looks like, when it comes to the number of groups, we should have id 608 and apple 10. However stata dose not recognizes that.

Stata output


Mixed-effects ologit regression Number of obs = 6,080

-------------------------------------------------------------
| No. of Observations per Group
Group Variable | Groups Minimum Average Maximum
----------------+--------------------------------------------
iid | 608 10 10.0 10
AppleNR | 6,080 1 1.0 1
-------------------------------------------------------------

Integration method: mvaghermite Integration pts. = 7

Wald chi2(2) = 3934.89
Log likelihood = -6690.0858 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
Purch1_r1 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
iat | -.3780785 .1062244 -3.56 0.000 -.5862744 -.1698826
ea | 1.345597 .0214517 62.73 0.000 1.303553 1.387642
-------------+----------------------------------------------------------------
/cut1 | 4.069106 .1396939 3.795311 4.342901
/cut2 | 5.633302 .1507736 5.337791 5.928813
/cut3 | 7.143381 .1655579 6.818893 7.467868
/cut4 | 8.641514 .1813477 8.286079 8.996949
/cut5 | 10.34706 .1998057 9.955445 10.73867
/cut6 | 12.10224 .2171978 11.67654 12.52794
-------------+----------------------------------------------------------------
iid |
var(_cons)| 1.09431 .1017395 .9120174 1.31304
-------------+----------------------------------------------------------------
iid>AppleNR |
var(_cons)| 4.45e-34 2.82e-18 . .
------------------------------------------------------------------------------
LR test vs. ologit model: chibar2(01) = 507.78 Prob >= chibar2 = 0.0000