본문 바로가기
반응형

분류 전체보기123

(R) apply function on matrix and data frame There are some functions provided by R to calculate statistics for rows or columns for matrix. columns, rowSums, colMeans, rowMeans are the things. > x = matrix(runif(20,min=2,max=35), 3) > x [,1] [,2] [,3] [,4] [,5] [,6][1,] 25.49332 29.93656 8.329258 9.427876 6.314251 11.469574[2,] 32.90328 25.86397 25.692699 23.865729 32.419499 33.890851[3,] 17.61071 20.22315 33.823737 18.290469 4.744376 6.37.. 2020. 11. 15.
Uniformly Most Powerful Test - Monotonic likelihood Ratio When critical region of a test is uniformly more powerful than any other critical region having same significance lvela(α), the test is called as ' Uniformly Most Powerful Test.' Also the critical region of the test is called as 'Uniformly Most Powerful Critical Region.' We use Uniformly most powerful test when testing a simple hypothesis versus composite hypothesis ,or testing composite hypothe.. 2020. 11. 12.
Most powerful test - Neyman-Pearson Theorem /proof/ examples/ Test statisticTest statistics: Statistics from random samples in hypothesis test. We can use statistics from complete sufficient statistics, maximum likelihood estimator, estimator from method of moment, minimum variance unbiased estimator and so on. Null hypothesis is a general state(people have accepted naturally) that we want to reject. Alternative hypothesis is a state that we want to accept.. 2020. 11. 11.
(R) functions for tables/ table(), ftable(),addmargins(), prop.table(), margin.table() table function is generally used for the frequency of each elements in variables. *table of a variable (a variable: gender)> x = c(rep("M", 3), rep("F", 2), rep(NA, 3))> x[1] "M" "M" "M" "F" "F" NA NA NA > table(x)xF M 2 3 Without 'exclude=NULL' we reject missing values automatically. If you want to add NA in the table, you can add 'exclude=NULL' Include NA in table Not include NA in table >tabl.. 2020. 11. 8.
반응형