BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tadeu1
Calcite | Level 5

Dear

I am running a proc mi and the following error appear:

ERROR: Each observation has analysis variables either all missing or all observed in the data set.

 

The code is:

data ISADORA;
input
Tratamento Blocos Material $ N P K Ca Mg S Na Cu Fe Zn Mn B;
TRAT=Tratamento||Material;
cards;
1 1 CLADODIO 18.2 2.2 18.1 19.6 4.2 1.5 1.1 10 92 287 108 41
1 2 CLADODIO 18.3 1.6 23.2 20.7 5.3 1.3 1.1 7 33 297 189 44
1 3 CLADODIO 16.4 2.3 18.3 16.5 4.8 1.3 1.1 4 84 185 123 36
1 4 CLADODIO 25.8 2.8 22.0 21.7 5.3 1.8 1.2 6 33 227 137 44
2 1 CLADODIO 18.1 2.3 24.6 19.8 5.9 1.4 1.0 7 53 243 122 35
2 2 CLADODIO 12.6 1.8 18.0 14.4 3.9 1.1 0.6 4 95 182 118 40
2 3 CLADODIO 16.5 3.3 20.8 17.6 4.3 1.6 1.0 5 87 167 102 47
2 4 CLADODIO 14.1 1.7 19.9 17.7 5.2 0.9 1.2 5 56 246 95 50
3 1 CLADODIO . . . . . . . . . . . .
3 2 CLADODIO 15.4 3.9 20.1 27.1 4.6 2.3 1.2 5 64 246 117 56
3 3 CLADODIO 13.2 2.9 16.9 21.0 4.2 1.6 0.6 6 91 195 126 29
3 4 CLADODIO . . . . . . . . . . . .
4 1 CLADODIO . . . . . . . . . . . .
4 2 CLADODIO 12.8 3.4 16.3 23.9 4.7 2.0 0.8 5 61 159 159 28
4 3 CLADODIO . . . . . . . . . . . .
4 4 CLADODIO . . . . . . . . . . . .
5 1 CLADODIO 16.5 5.8 17.0 28.7 5.3 1.9 1.2 5 70 193 144 21
5 2 CLADODIO 12.1 3.4 16.2 27.8 5.2 2.0 0.9 5 27 172 148 29
5 3 CLADODIO 13.9 3.9 19.9 30.0 5.7 2.5 1.5 4 83 172 102 50
5 4 CLADODIO 12.7 2.7 13.5 18.7 4.1 1.9 1.0 7 26 254 106 19
1 1 FLOR 21.3 2.8 32.5 3.9 3.6 1.3 0.2 6 28 66 35 40
1 2 FLOR 19.6 2.3 33.6 5.0 4.1 1.1 0.2 8 38 88 60 38
1 3 FLOR 18.7 2.7 34.0 3.5 4.3 1.3 0.3 5 37 64 38 41
1 4 FLOR 21.1 2.3 35.6 6.7 4.3 1.3 0.1 5 58 74 69 35
2 1 FLOR 18.9 3.1 35.3 2.3 3.8 1.4 0.3 6 32 75 24 39
2 2 FLOR 18.0 2.5 31.9 2.0 3.8 1.3 0.2 4 41 51 27 42
2 3 FLOR 18.3 2.9 35.3 3.6 4.1 1.5 0.2 5 48 79 27 54
2 4 FLOR 17.2 2.4 30.5 3.2 3.6 1.1 0.2 4 32 58 24 45
3 1 FLOR . . . . . . . . . . . .
3 2 FLOR 19.5 2.9 36.4 6.7 4.2 1.5 0.2 6 24 75 67 67
3 3 FLOR 19.3 2.9 32.0 5.4 3.6 1.4 0.2 6 28 103 47 26
3 4 FLOR . . . . . . . . . . . .
4 1 FLOR . . . . . . . . . . . .
4 2 FLOR 18.1 2.9 31.3 4.2 3.6 1.3 0.2 4 23 59 53 48
4 3 FLOR . . . . . . . . . . . .
4 4 FLOR . . . . . . . . . . . .
5 1 FLOR 21.6 3.4 43.7 7.9 5.1 1.7 0.2 6 48 75 53 45
5 2 FLOR 18.4 2.9 33.1 5.1 4.1 1.4 0.2 5 27 61 46 47
5 3 FLOR 17.2 3.0 32.1 3.9 3.9 1.4 0.2 5 48 150 38 38
5 4 FLOR 18.7 2.9 34.5 5.2 4.2 1.4 0.2 4 22 180 40 55
1 1 CASCA 9.3 1.2 36.7 5.7 3.2 0.8 0.5 5 83 65 47 71
1 2 CASCA 9.0 1.2 42.2 7.0 3.2 0.8 0.5 5 81 74 64 62
1 3 CASCA 11.0 1.1 39.7 6.8 3.0 0.7 0.6 3 60 53 55 70
1 4 CASCA 11.3 1.2 44.1 7.1 3.2 0.7 0.4 3 89 53 42 72
2 1 CASCA 10.2 1.2 33.0 5.2 2.5 0.6 0.4 7 57 56 42 64
2 2 CASCA 9.4 1.1 37.7 7.2 3.3 0.7 0.5 4 38 57 54 82
2 3 CASCA 9.4 1.3 32.3 5.2 2.7 0.7 0.5 4 49 89 35 60
2 4 CASCA 10.6 1.5 34.9 5.9 2.8 0.7 0.5 3 38 65 46 67
3 1 CASCA 10.8 1.6 40.1 7.1 2.9 0.8 0.3 5 36 78 49 61
3 2 CASCA 9.4 1.4 34.0 4.3 2.3 0.8 0.3 5 90 21 35 55
3 3 CASCA 9.7 1.3 31.8 3.9 2.4 0.7 0.3 4 38 59 25 49
3 4 CASCA 9.4 1.3 36.7 6.6 3.0 0.7 0.5 4 35 64 43 50
4 1 CASCA 9.5 1.3 32.7 5.3 2.6 0.8 0.4 4 37 56 36 52
4 2 CASCA 9.6 1.5 35.1 3.9 2.5 0.7 0.2 3 39 52 29 49
4 3 CASCA 9.7 1.5 35.4 5.2 2.6 0.8 0.4 4 31 77 39 28
4 4 CASCA 10.4 1.7 31.9 6.6 2.8 0.7 0.4 5 27 82 40 28
5 1 CASCA 10.1 1.9 37.5 8.3 3.3 0.9 0.6 5 32 90 60 29
5 2 CASCA 8.1 1.2 30.2 4.6 2.4 0.7 0.4 3 87 17 31 24
5 3 CASCA 9.9 1.5 35.3 7.9 3.0 0.8 0.5 4 55 33 46 46
5 4 CASCA 10.9 1.7 34.4 5.4 2.9 0.8 0.3 5 24 76 34 62
1 1 POLPA 13.0 2.2 18.8 0.5 2.1 1.1 0.1 5 57 52 14 11
1 2 POLPA 13.6 2.1 20.0 0.6 2.3 1.1 0.1 4 48 47 14 8
1 3 POLPA 9.9 1.6 15.6 0.7 1.8 0.8 0.1 3 78 39 13 3
1 4 POLPA 14.1 2.2 19.9 0.8 2.3 1.0 0.1 4 42 47 15 7
2 1 POLPA 11.7 1.9 14.7 0.5 1.8 0.9 0.1 3 34 35 11 8
2 2 POLPA 9.5 1.7 14.5 1.1 1.7 0.8 0.1 3 36 46 13 6
2 3 POLPA 9.0 1.6 15.1 0.4 1.6 0.8 0.0 3 23 28 9 9
2 4 POLPA 9.7 1.8 16.1 0.5 1.7 1.2 0.1 7 22 35 11 14
3 1 POLPA 12.3 2.1 18.5 0.7 2.2 1.1 0.0 4 27 33 15 20
3 2 POLPA 11.0 1.8 18.0 0.5 2.0 1.0 0.0 3 52 12 13 14
3 3 POLPA 9.8 1.4 13.4 0.3 1.4 0.6 0.0 3 17 20 7 8
3 4 POLPA 10.2 1.8 16.7 0.9 1.9 0.9 0.1 5 22 25 14 13
4 1 POLPA 12.9 2.1 18.7 0.6 2.1 1.1 0.1 4 20 38 13 22
4 2 POLPA 11.5 1.8 16.6 0.5 1.9 1.0 0.0 4 26 44 11 18
4 3 POLPA 12.9 2.0 17.2 0.5 1.9 1.0 0.1 4 18 29 11 17
4 4 POLPA 9.7 1.9 16.0 0.4 1.7 0.9 0.1 4 26 24 10 15
5 1 POLPA 10.2 2.0 16.0 0.6 1.8 1.0 0.1 4 16 29 12 19
5 2 POLPA 10.2 1.8 15.0 0.5 1.7 0.9 0.1 3 36 14 12 13
5 3 POLPA 10.9 2.1 18.4 0.7 2.0 1.2 0.1 4 25 15 11 13
5 4 POLPA 8.1 1.7 12.9 0.6 1.5 0.8 0.0 4 26 29 9 14
;
proc mi data=ISADORA MU0=8.1 1.7 12.9 0.6 1.5 0.8 0.0 4 26 29 9 14 seed=68619
out=outmi;
mcmc chain=multiple displayinit initial=em(itprint);
var N P K Ca Mg S Na Cu Fe Zn Mn B;
run;

 

Can someone help me?

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Well, you cannot impute your missing values without some informative data, and your VAR statement eliminates the only source for those.  Consider using all the variables for each record and see if any improvement is found  You may have to look at various imputation methods, but with the MCMC method, perhaps this will work:

 

proc mi data=ISADORA MU0= . . . 8.1 1.7 12.9 0.6 1.5 0.8 0.0 4 26 29 9 14 seed=68619
out=outmi;
mcmc chain=multiple displayinit initial=em(itprint);
var Tratamento Blocos Material N P K Ca Mg S Na Cu Fe Zn Mn B;
run;

If not, then consider adding a CLASS statement with Tratamento Blocos Material as the variables, and then using an appropriate FCS method.  This example may be helpful.

.

 

SteveDenham

View solution in original post

1 REPLY 1
SteveDenham
Jade | Level 19

Well, you cannot impute your missing values without some informative data, and your VAR statement eliminates the only source for those.  Consider using all the variables for each record and see if any improvement is found  You may have to look at various imputation methods, but with the MCMC method, perhaps this will work:

 

proc mi data=ISADORA MU0= . . . 8.1 1.7 12.9 0.6 1.5 0.8 0.0 4 26 29 9 14 seed=68619
out=outmi;
mcmc chain=multiple displayinit initial=em(itprint);
var Tratamento Blocos Material N P K Ca Mg S Na Cu Fe Zn Mn B;
run;

If not, then consider adding a CLASS statement with Tratamento Blocos Material as the variables, and then using an appropriate FCS method.  This example may be helpful.

.

 

SteveDenham

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1537 views
  • 1 like
  • 2 in conversation