BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
meghbali14
Fluorite | Level 6

Dear Friends,

When I run the PROC MIXED procedure, in the SAS 9.4 result, I found the “Non-est” for one group (in my set of data, group 2). Please let me know how to solve this problem? Thank you very much in advance.

 

data chew_act_cov;

input number  Name$  day  group  RUMINATETIME  EATTIME  TOTALCHEWINGTIME  RUMINATECHEWSPERMINUTE;

cards;

2 Kiana 1     1     512.33     234.75      747.08      55.35

2 Kiana 2     1     557.6       238.55      796.15      54.74

2 Kiana 3     1     606.17     272.25      878.42      59.57

2 Kiana 4     1     573.43    185.9        759.33       55.16

4 Babsi 1     1     428.25     307.68     735.93       61.80

4 Babsi 2     1     567.3       397.55      964.85      70.08

4 Babsi 3     1     567.3       397.55      964.85      70.08

4 Babsi 4     1     592.58     414.98      1007.57    70.57

4 Babsi 5     1     538.13      409.6        947.73     60.41

4 Babsi 6     1     498.42      309.98      808.4       62.34

5 Utah  1     1     493.37      429.57       922.93     51.67

5 Utah  2     1     495.32      438.32       933.63     60.63

6 Uruguay     1     1     479.65      146.88       626.53    43.95

6 Uruguay     2     1     648.48     180.57        829.05      60.76

6 Uruguay     3     1     667.55      222.9          890.45      57.94

6 Uruguay     4     1     680.93     171.82        852.75      54.65

6 Uruguay     5     1     683.13     162.23        845.37      60.12

7 Polli 1     1     421.93       239.68         661.62        52.46

7 Polli 2     1     306.05       214          520.05      41.65

7 Polli 3     1     214.8        279.08      493.88      36.05

17 Prima 1     1     448.92   197.57      646.48     57.23

17 Prima 2     1     550.47    209.9       760.37     57.72

17 Prima 3     1     518.18    210.45      728.63    59.96

17 Prima 4     1     496.22   171.1          667.32    55.42

17 Prima 5     1     520.12    171.88       692        56.69

25 Zoey  1     1     88.1         180.3       268.4      19.34

25 Zoey  2     1     72.83       215.55     288.39     17.11

25 Zoey  3     1     78.57      192.08      270.65      19.26

26 Anna  1     1     592.82    328.95      921.77      74.45

26 Anna  2     1     530.55      345.15      875.7      68.13

10 Bella 1     2     539.95      455.317    995.27       55.27

10 Bella 2     2     565.1        435.9        1001       64.05

10 Bella 3     2     539.63      444.75      984.38     57.025

10 Bella 4     2     529.9        416.42      946.32      60.54

10 Bella 5     2     577.42       407.08      984.5       63.42

12 Mala  1     2     456.28      358.05      814.33      57.85 

12 Mala  2     2     606.7        393.23      999.93      74.71 

12 Mala  3     2     580.6       444.52      1025.12     75.04

12 Mala  4     2     538.93      372.2        911.13      65.26

14 Wendy 1     2     420.87    276.42     697.28      46.49

14 Wendy 2     2     586.95      349.73   936.68     68.89

14 Wendy 3     2     573.27     392.8      966.07     68.46

14 Wendy 4     2     534.65      363.15   897.8        62.34

18 Mona  1     2     430.42       300.08   730.5       56.42

18 Mona  2     2     577.92      402.03    979.95      70.58

18    Mona  3     2     633.47     332.7       966.17      63.35

18 Mona  4     2     635.35     378.65     1014        73.07

18 Mona  5     2     578.28      353.4       931.68    70.91

21 Peggy 1     2     453.73       347.95    801.68   42.48

21 Peggy 2     2     572.6       458.18     1030.78   66.99

21 Peggy 3     2     600.8      401.62      1002.42   64.48

21 Peggy 4     2     560.22     476.95      1037.16    61.47

21 Peggy 5     2     617.82     417.9       1035.72      58.71

22 Panama      1     2     355.95      410.68      766.63     46.36

22 Panama      2     2     508.4        414.63      923.03    1583.50

22 Panama      3     2     544.17      473.7 1017.87         59.46

22 Panama      4     2     578.25      391.25      969.5     74.88

22 Panama      5     2     580.02      418.43     998.45      68.03

24 Bianca      1     2     487.53        368.15      855.68     48.79

24 Bianca      2     2     514.52      480.73       995.25      51.77

24 Bianca      3     2     516.03      445.52       961.55      56.87

24 Bianca      4     2     514.88      387.35      902.23       56.00

;

proc mixed;

class Name day group;

model RUMINATETIME=group day group*day;

repeated day/type=ar(1) sub=Name(group);

lsmeans group;

run;

proc mixed;

class Name day group;

model       EATTIME=group day group*day;

repeated day/type=ar(1) sub=Name(group);

lsmeans group;

run;

proc mixed;

class Name day group;

model       TOTALCHEWINGTIME=group day group*day;

repeated day/type=ar(1) sub=Name(group);

lsmeans group;

run;

proc mixed;

class Name day group;

model RUMINATECHEWSPERMINUTE=group day group*day;

repeated day/type=ar(1) sub=Name(group);

lsmeans group;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

I am expand a bit on @PaigeMiller 's response. If you fit a model with main effects and an interaction, and you have a missing cell, the main effects will be non-estimable.  However, if you fit a model that contains ONLY the interaction (a one-way model often called a "means model"), and use an LSMESTIMATE statement you can calculate main effect means and standard errors. Main effect F tests can also be calculated within LSMESTIMATE statements as well, using the JOINT and/or FTEST options.

 

SteveDenham 

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

There is an empty cell, with 0 data points, where day is 6 and group is 2. Interactions cannot be estimated when there are cells with 0 data points; and in addition some of the LSMEANS are non-estimable.

 

Possible paths forward is to remove day 6 from the analysis, or remove the interaction from the model.

--
Paige Miller
SteveDenham
Jade | Level 19

I am expand a bit on @PaigeMiller 's response. If you fit a model with main effects and an interaction, and you have a missing cell, the main effects will be non-estimable.  However, if you fit a model that contains ONLY the interaction (a one-way model often called a "means model"), and use an LSMESTIMATE statement you can calculate main effect means and standard errors. Main effect F tests can also be calculated within LSMESTIMATE statements as well, using the JOINT and/or FTEST options.

 

SteveDenham 

meghbali14
Fluorite | Level 6

Dear Paige Miller,

 

Thanks for your response. The first path didn't worked, after removing the day 6 for one of cow, but I also had non-estimated error.

Fortunately, the second path you suggested was worked. I removed the interaction in the model and then get the results. Thank you very much.

 

All the best,

Mansour

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1213 views
  • 2 likes
  • 4 in conversation