0

この質問に具体的に答えられない場合は、重複のマークを付けないでください

私はlapplyを使用しておらず、質問もこれと一致しませ

size income.gap count1 count2
 1    1000000   656   656  
 2    1000000   1443  1443  
 3    1000000   1232  1232  
 4    1000000   1036  1036  
 5    1000000   540   540  
 6    1000000   227   227  
 7    1000000    94    94  
 8    1000000    38    38  
 9    1000000    22    22  
10    1000000     4     4  



gap.data.conf <- ddply(data, ~ size, summarize, 
                   gap = mean(income[gender == "Male"], na.rm = TRUE) - mean(income[gender == "Female"], na.rm = TRUE),
                   upper = -t.test(income ~ gender)$conf.int[1],
                   lower = -t.test(income ~ gender)$conf.int[2])

エラー:

 Error in t.test.default(x = c(35000L, 24000L, 24000L), y = 26000L) :
not enough 'y' observations

上の表に示されているようにカウントが等しいのに、y の観測値が十分でないのはなぜですか?

4

0 に答える 0