Goodness-of-Fit Tests with Censored Data
- 格式:ppt
- 大小:768.50 KB
- 文档页数:35
索引索引中的页码为英文原书页码,与书中页边标注的页码一致AA.R.E.(asymptotic relative efficiency)(渐近相对效率),112of Cox and Stuart test(Cox 和Stuart检验), 175, 323of Daniel test(Daniel检验), 322of Durbin test(Durbin检验), 394of Frieaman test(Frieaman检验), 379of Kendall’s tau, 327of Kruskal-Wallis test(Kruskal-Wallis检验), 287of Mann-Whitney test(Mann-Whitney检验), 284of median test(中位数检验), 285, 297of paired t test(配对t检验), 364of Quade test(Quade检验), 380of quantile test vs. one-sample t test(分位数检验对一样本t检验), 148of rank test for slope(斜率的秩检验), 342of sign test(符号检验), 363of sign test vs. t test(符号检验vs. t检验), 164,175of sign test vs. Wilcoxon signed ranks test(符号检验vs. Wilcoxon符号秩检验),164, 175 of Spearman’s rho,327of squared ranks test(平方秩检验), 309of two-sample t test(两样本t检验), 284of Wilcoxon signed ranks test(Wilcoxon符号秩检验), 363acceptance region(接受域), 98aligned-rank methods(秩排列方法),384, 385alternative hypothesis(备择假设),95alternatives, ordered(备择的,次序的), 297analysis of covariance(方差分析), 297analysis of covariance,one-way(方差分析,一种方式), 222, 297approximate confidence interval for μ(μ的近似置信区间), 85approximation formulas for tolerance limits(容忍限逼近公式), 151, 155 approximation, normal(逼近,正态):to binomial distribution(二项分布), 58to sum of ranks(秩和), 58approximations to chi-squared distribution(χ2分布近), 62asymptotic relative efficiency, (see also A. R. E)(渐近相对效率), 112asymptotically distribution-free methods(渐近分布自由方法), 117Bbiased estimators for σ, 85 σ的有偏估计量biased test, 108 有偏检验binomial coefficient, 9, 11 二项系数binomial distribution, 28 二项分布mean and variance in, 49 均值和方差normal approximation to, 58 正态逼近tables of the, 513-524 表格tests based on the, 123 基于…的检验binomial expansion, 11 二项展开binomial test, 104, 124 二项检验power of, 127 功效bioassay, 119 生物鉴定bivariate random variable, 72 二维随机变量block design, incomplete, 387 区组设计,不完全的randomized complete, 251, 368 完全随机化blocks, multiple comparisons with complete, 371, 375 区组, 完全多重比较bootstrap, 349 bootstrapbootstrap method of estimation, 86 估计的bootstrap方法censored data, 297 删失数据censored sample, 155, 285 删失样本central limit theorem, 57, 85 中心极限定理centroid, 36 重心chi-squared approximation to Kruskal-Wallis test, 295 χ2近似Kruskal-Wallis检验chi-squared approximation distribution function, 54, 59 分布函数的χ2逼近approximations to, 62 逼近到…tables, 512 表格chi-squared goodness-of-fit test, 239, 240, 429, 430, 442, 443 χ2拟合优度检验chi-squared random variables, sum of, 62 χ2随机变量,和chi-squared test: χ2检验for differences in probabilities, 180, 199 概率差异with fixed marginal totals, 209 固定边缘总和for independence, 204 独立性circular distributions, 285, 364 圆周分布cluster analysisi, 419 聚类分析Cochran test, 250 Cochran检验Cochran’s criteria for small expected values, 202 对小期望值的Cochran准则confidence, 83 置信multinomial, 9, 12 多项式coefficient of concordance, Kendall’s, 328, 380 一致性系数,Kendall’s comparisons, multiple: 对比,多重with complete blocks, 371, 375 完全区组incomplete blocks, 390 不完全区组with independent sample, 290, 297, 398 独立样本in test for variances, 304 方差检验complete block design, randomized, 368 完全区组设计,随机化completely randomized design,222 完全随机化设计composite hypothesis, 97 复合假设computer simulation to find null distribution, 446, 447 计算机模拟求零假设分布concordance between blocked rankings, 385 区组秩间的一致性condorance, Kendall’s coefficient of, 328, 382 一致性, Kendall 系数concordant pairs, 319 不和谐配对conditional probability, 17, 23, 24 条件概率conditional probability function, 29 条件概率函数confidence band for a distribution function,438 分布函数置信界confidence coefficient, 83, 114, 129 置信系数for the difference between two means, 281 两均值差异for a mean, parametric, 149 均值,参数for the median difference, 360 中位差异for μ, approximate, 85 对于μ, 逼近for a probability or population proportion, 130 对于概率或总体比例exact tables for, 525-536 精确表格for a quantile, 135, 143 分位数one-sided, 153 单边for a slope, 335 斜率conservative test, 113 保守检验consistent, 117 相合的consisitent sequence of tests, 106, 108, 160 检验的相合序列consistent, sign test, 163 相合,符号检验contingency coefficient 列联系数:Cramér’s, 229 CramérPearson’s, 231 PearsonContingency table, 166, 179, 199, 292 列联表fourfold, 180 四重的multi-dimenional, 215 多维的r×c, 199 r×c维three-way, 214 三种方式的two-way, 214 两种方式的continuity correction, 126, 127, 135, 138, 159, 190, 192, 194, 195 连续修正in Kendall’s tau, 322 Kendall’s tauin Mann-Whitney test, 274, 275 Mann-Whitney 检验in Wilcoxon signed ranks test, 359 Wilcoxon符号秩检验continuous distribution function, 53 连续分布函数continuous random variable, 52, 53 连续型随机变量control, sign test for comparing several treatments with a, 175 控制,几种处理比较的符号检验convenience sample, 69 方便样本correction for continuity, 126, 127, 135, 138, 159, 190, 192, 194, 195 连续修正correction, Sheppard’s, 248 修正,Sheppard correlation: 相关性quick test for, 196 快速检验rank, 312 秩sign test for, 172 符号检验correlation coefficient: 相关系数Kendall’s partial,327 Kendall 偏Kendall’s rank, 318, 319, 325, 326 Kendall 秩Pearson’s product moment, 313,318 Pearson 乘积矩Spearman’s rank, 314, 325, 326 Spearmn秩correlation coefficient between two random variables, 43 两随机变量的相关系数correlation test: 相关性检验Kendall’s rank, 175, 321 Kendall秩Spearman’s rank, 175, 316 Spearma秩counting rules, 5 计数法则covariance, 39 协方差analysis of, 297 分析of two random variables, 41, 42, 46 两随机变量of two ranks, 45 两秩Cox and Stuart test for trend, 169, 170 Cox 和Stuart趋势检验A.R. E. of, 175Cramér’s coefficient, 230, 234 Cramér系数Cramér’s contingency coefficient, 229 Cramér列联系数Cramér’s-von Mises goodness-of –fit test, 441 Cramér’s-von Mises拟合优度检验Cramér’s-von Mises two-sample test, 463 Cramér’s-von Mises两样本检验tables for, 464 表格critical region, 97, 98, 101 临界区域size of, 100 大小curves, survival, 119 曲线, 生存Daniel’s test for trend, 323 Daniel趋势检验decile, 33, 34 十分位数(的)decision rule, 98 决策法则degrees of freedom, 59 自由度dependence, measure of, 227 相依,度量design: 设计completely randomized, 222 完全随机化experimental, 419 经验incomplete block, 387 不完全区组randomized complete block, 368 随机化完全区组deviates, random normal, 404 偏离,正态随机difference between two means, confidence interval for the, 281 两均值差异,置信区间difference, confidence interval for the median, 360 差异,中位数置信区间discordant pairs, 319 不和谐配对discrete distribution function, 52 离散分布函数discrete random variable, 52 离散型随机变量discrete uniform distribution, 28, 437 离散均匀分布discriminant analysis, 119, 419 判别分析dispersion, sign test for trends in, 175 散布,趋势的符号检验distribution: 分布binomial, 27 二项discrete uniform, 28 离散均匀exponential, 447 指数hypergeometric, 30 超几何分布lognormal, 453 对数正态分布null, 99 零假设uniform, 433 均匀distribution-free, 114 分布自由distribution-free methods, asymptoticall, 117 分布自由方法,渐近的distribution function, 26 分布函数chi-squared, 54, 59 χ2confidence band for, 438 置信界continuous, 53 连续discrete, 52 离散empirical, 79, 428 经验joint, 29 联合normal, 54, 55 正态of order statistics, 146, 147, 153 次序统计量sample, 79, 80 样本distributions with heavytails, 116, 148, 164 重尾分布distributions with light tails, 116, 164 轻尾分布dose-response curves, 349 剂量响应曲线Durbin test, 387, 388 Durbin检验efficiency of, 394 效率efficiency, 106 效率asymptotic, 112 渐近的of the Durbin test,394 Durbin检验of the Friedman test, 379 Friedman检验of the paired t-test, 364 配对t检验的relative, 110, 111, 112 相关的of the sign test, 364 符号检验of the Smirnov test, 465 Smirnov检验of the Wilcoxon test, 364 Wilcoxon检验empirical distribution function, 79, 428 经验分布函数empirical survival function, 89 经验生存函数empty set, 14 空集error: 误差standard, 85, 88 标准type Ⅰ, 98 Ⅰ类typeⅡ,98, 99 Ⅱ类estimate: 估计interval, 83 区间point, 83 点of the standard deviation, 443 标准差estimation, 79, 88 估计of parameters in chi-squared goodness-of-fit test, 243, 245, 249 参数χ2拟合度估计estimator, 79, 81 估计量of population mean, 115 样本均值of population standard deviation, 115 样本标准差unbiased, 74 无偏for μ, 84 μfor σ2, 85 σ2 event, 7, 14 事件probability of, 14 概率sure, 14 必然事件events, independent, 18, 19 事件,独立joint, 17 联合mutually exclusive, 18, 19 互不相容exact test, Fisher’s, 188, 213 精确检验,Fisher exclusive, mutually, 14 不相容,相互expected normal scores, 404 期望正态得分expected value, 35, 39 期望(值) expected values, small: 期望(值),小in contingency tables, 201, 220 列联表in goodness-of-fit test, 241, 249 拟合优度检验experiment, 6, 69 试验experimental design, 419 试验设计experiments, independent, 15, 19, 20 试验,独立exponential distribution, 447 指数分布Lilliefors test for the, 448 Lilliefors检验extension of the median test, 224 中位数检验的扩展F-distribution: F分布in Friedman test, 370 Friedman检验in incomplete block analysis, 389 不完全区组分析in Quade test, 374 Quade检验table of the, 562-571 表格F statistic, 297, 300 F统计量computed on scores, 312 得分计算F test, 297, 300 F检验for equal variances, 308, 309 等方差for randomized complete blocks, 379 随机完全区组factorial notation, 8 阶乘记号families of distributions, goodness-of-fit tests for, 442 分布族,拟合优度检验Fisher’s: Fisherexact test, 188, 213 精确检验least significant difference, 296 最小显著差异LSD procedure on ranks, 379method of randomization,407 随机化方法four-fold contingency table, 180, 233 四重列联表freedom, degrees of, 59 自由,度Friedman test, 367, 369 Friedman检验efficiency of, 379 效率extension of, 383 推广function: 函数distribution, 26 分布powder, 163 功效probability, of a random variable, 25 概率, 随机变量probability, on a sample space, 15 概率,样本空间random, 80 随机step, 52 阶梯survival, 80 生存gamma coefficient, 320 gamma 系数goodness-of-fit test: 拟合优度chi-squared, 239, 240 χ2Cramér-von Mises, 441 Cramér-von Mises kolmgorov, 428,430, 435 Kolmgorov goodness-of-fit tests for families of distributions,442 分布族拟合优度检验grand median, 218 全中位数heavy tails, distributions with, 116, 148, 164 重尾,分布Hodges-Lahman estimate of shift, 282, 361 Hodges-Lahman 漂移估计hypergeometric distribution, 30, 188, 191 超几何分布mean of, 188, 191 均值standard deviation of, 188, 191 标准差hypothesis: 假设alternative, 95 备择的composite, 97 复合的null, 95 零假设simple, 97 简单testing, 95 检验tests, properties of, 106 检验,性质incomplete block design, 368, 387 不完全区组设计incomplete block, multiple comparisons, 390 不完全区组, 多重比较independence, the chi-squared test for, 204 独立,χ2检验independent: 独立events, 18, 19 事件experiments, 15, 19, 20 试验random variables, 31, 46, 72 随机变量samples, multiple comparisons with, 290, 296, 398 样本,多重比较samples, randomization test for two, 409 样本,随机化检验inference, statistical, 68 推断,统计的interaction: 交互rank transformation test for, 419 秩变换检验test for, 384 检验intercept, 333 截距Internet websites, v 因特网,网址interquartile range, 37 四分位数极差interval, confidence, 83 区间,置信interval estimate, 83, 129 区间估计interval scale of measurement, 74 测量的区间尺度joint distribution function, 28, 29 联合分布函数joint event, 17 联合事件joint probability function, 28 联合概率函数Jonckheere-Terpstra test for ordered alternatives, 325 Jonckheere-Terpstra顺序备择检验Kaplan-Meier estimator, 89 Kaplan-Meier估计量Kendall’s: Kendall coefficient of concordance, 328 一致性系数partial correlation coefficient, 327 偏相关系数rank correlation test, 175, 321 秩相关检验tau, 318, 319, 325, 326, 335exact tables, 545-546 精确表tau, A. R. E. of, 327 tautau for ordered alternatives,381 顺序备择tau Klotz test, 401 Klotz检验Kolmogorov goodness-of-fit test, 428, 430 Kolmogorov 拟合优度检验exact tables, 549 精确表Kolmogorov goodness-of-fit test for discrete distributions, 435离散分布的Kolmogorov拟合优度检验Kolmogorov-Smirnov tests, 428 Kolmogorov-Smirnov检验Kruskal-Wallis test, 288 Kruskal-Wallis检验exact tables for, 541 精确表least significant difference, Fisher’s, 296 最小显著差异, Fisher’s least squares estimates, 334 最小二乘估计least squares method, 333 最小二乘方法Let’s make a deal, 66 让我们和妥协level of significance, 99 显著水平life testing, 148 寿命检验light tails, distributions with, 116, 164 轻尾,分布likelihood ratio statistic, 258 似然比统计量likelihood ratio test, 259 似然比检验Liliefors test for the exponential distribution, 448 指数分布的Liliefors检验table, 551 表格Liliefors test for normality, 443 Liliefors 正态性检验tables, 551 表格limits, tolerance, 150 极限,容忍linear regression, 333 线性回归location estimates, robust, 362 位置估计,稳健location measure of, 36 位置度量loglinear models, 215, 259 对数线性模型lognormal distribution, 453 对数正态分布longitudinal studies, 119 纵向研究lottery game, Texas Lotto, 66 彩票游戏,Texas Lotto lower-tailed test, 98 左边检验Mann-Whitney test, 103, 203, 271 Mann-Whitney检验tables, 538-540 表格Mantel-Haenszel test, 192 Mantel-Haenszel检验marginal totals, chi-squared test with fixed, 209 边缘和,固定的χ2检验matched pairs,350 配对randomization test for, 412 随机化检验McNemar test, 166, 180, 252, 255, 256 McNemar检验compared with paired t test, 178 与配对t检验比较mean, 36, 51 均值of hypergeometric distribution, 188, 191 超几何分布population, estimator of, 115 总体,估计量in rank test using scores, 306 得分的秩检验sample, 81, 83 样本of sum of random variables, 39 随机变量和of sum of ranks, 41, 49 秩和and variance in binomial distribution, 49 二项分布的方差means: 均值confidence interval for the difference between two, 281 两差异的置信区间sign test for equal, 160 对相等的符号检验measurement scale, 73 度量尺度interval, 74 区间nominal, 73 名义ordianal, 74 有序的ratio, 75 比率measures of dependence, 227 相依度量median, 33, 34 中位数difference, confidence interval for, 360 差异,置信区间grand, 218 总的sample, 82 样本test, 218, 352, 355 检验comparison with Kruskal-Wallis test,291 与Kruskal-Wallis检验的比较an extension of, 224 一个推广medians, sign test for equal, 160 中位数,对相等的符号检验meta-analysis, 452 无-分析minimum chi-squared method, 243, 245 最小χ2距离方法Minitab, v, 91, 107, 127, 130, 139, 144, 161, 182, 201, 205, 210, 220, 241, 276, 282, 290, 318, 322, 328, 336, 355, 361, 371, 382, 390, 444, 451model, 6 模型models,loglinear,215, 259 模型,对数线性monotonic regression, 344 单调回归Mood test for variances, 309, 312 Mood 方差检验multi-dimensional contingency table, 215 多维列联表multinomial: 多项式的coefficient, 9, 12, 系数distribution, 203, 207, 249 分布proportions, simultaneous confidence intervals for, 133 比例,联合置信区间multiple comparisons: 多重比较complete block design, 371, 375 完全区组设计incomplete blocks design,390 不完全区组设计independent samples, 290,297,398 独立样本in one-way layout, 220,222,252 以一种方式设计variance, 304 方差multiple regression, 419 多元回归multivariate data, randomization test for, 416 多元数据,随机化检验multivariate observations,385 多元观察multivariate random variable, 71, 72 多元随机变量confidence region for, 362, 364 置信区间mutually exclusive, 14 互不相容events, 19 事件NCSS, vnominal scale data, 117, 118 名义尺度数据nominal scale of measurement, 73 测量的名义尺度nonparametric methods, 116 非参数方法nonparametric statistics, 2, 114 非参数统计definition, 118 定义normal approximation: 正态逼近to binomial distribution, 58 二项分布to chi-squared distribution, 62 χ2分布to hypergeometric, 188, 194 超几何in Mann-Whitney test, 301, 302 Mann-Whitney检验to sum of ranks, 58 秩和in Wilcoxon signed ranks test, 301, 302 Wilcoxon秩和检验normal deviates, random, 404 正态偏差,随机normal distribution function, 54, 55 正态分布函数standard, 55 标准正态分布函数tables of, 508-511 标准正态分布函数表normal scores, 396 标准得分expected,404 期望的in matched pairs test, 400 配对检验in one-way layout, 397 以一种方式设计in test for correlation, 403 相关检验in test for variance, 401 方差检验in two-way layout, 403 以两种方式设计normality: 正态Lilliefors test for, 443 Lilliefors正态检验Shapiro-Wilk test for, 450 Shapiro-Wilk检验normalized sample, 443 标准化样本null distribution, 99 零假设分布null hypothesis,96 零假设one-sample case, 350 一样本情形one-sample t test, 363, 418 一样本t 检验one-tailed test,98 单边检验one-to-one correspondence, 52 一一对应one-way analysis of variance, 222, 297 一种方式的方差分析one-way layout, 227 一种方式的设计order statistic of rank k, 77, 82 秩的次序统计量order statistics, 143 次序统计量distribution function of,146, 147, 153 分布函数ordered alternatives, 297, 385 有序备择Jonckheere-Terpstra test for, 325 Jonckheere-Terpstra检验Page test for, 380 Page检验ordered categories, analysis of contingency table with, 292 有序分类,列联表分析ordered observation, 77 次序观察ordered random sample, 77 次序随机样本ordinal data, 117, 118, 271, 272 有序数据ordinal scale of measurement, 74 测量的顺序尺度outcomes, 6 结果outliers, 117, 284, 297 离群值p-value, 101 p-值Page test for ordered alternatives, 380 顺序备择的Page检验paired t test, 363 配对t检验efficiency of,364 效率McNemar test compared with, 178 McNemar检验的比较parallelism of two regression lines, 364 两回归直线的平行parameter estimation, 88 参数估计parametric confidence interval for mean, 149 均值的参数置信区间parametric methods, 115 参数方法parametric statistics, 2, 114 参数统计partial correlation coefficient: 偏相关系数Kendall’s, 327 Kendall’Spearman’s, 328 SpearmanPASS, v, 107Pearson product moment correlation coefficient, 313 Pearson乘积矩相关系数Pearson’s Pearsoncontingency coefficient, 231 列联系数mean-square contingency coefficient, 231 均方列联系数product moment correlation coefficient, 313, 318 乘积矩相关系数percentile, 33, 34 百分位点phi coefficient, 234, 239 phi系数Pitman’s efficiency, 112 Pitman有效性point estimate, 83 点估计point in the sample space, 13 样本空间中的点population, 68, 69 总体sampled, 69, 70 抽样target, 69, 70 目标power, 3, 100, 106, 116 功效of the binomial test, 127 二项检验function, 106, 163 函数probabilities, chi-squared test for differences in, 180, 199 概率,差异的χ2检验probability, 5, 13 概率conditional, 17, 23 条件的confidence interval for, 130 置信区间of the event, 14 事件function, 15 函数conditional, 29 条件的joint, 28 联合of the point, 14 点的sample, 69 样本properties of random variables, 33 随机变量的性质proportion, confidence interval for population, 130 比例,总体的置信区间Quade test, 367, 373 Quade检验efficiency of, 380 效率power of, 380 功效quantile, 27, 33, 34 分位数confidence interval for, 135, 143 置信区间population, 136 总体sample, 81 样本test, 135, 136, 222 检验A.R.E. vs.one-sample t test, 148 A.R.E. vs.一样本t检验quartile, 33, 34 四分位数random function, 80 随机函数random normal deviates, 404 随机正态偏差random sample, 69, 70, 71 随机样本random variable, 22, 23, 76 随机变量bivariate, 72 二维continuous, 52, 53 连续discrete, 52 离散distribution function of, 26 分布函数multivariate, 71, 72 多元probability function of, 25 概率函数random variables: 随机变量correlation coefficient between two, 43 两随机变量的相关系数covariance of two, 41, 42, 46 两随机变量的协方差independent, 31, 46, 72 独立properties of, 33 性质randomization, Fisher’s method of, 407 随机化,Fisher方法randomization test for two independence samples, 409 独立样本的随机化检验randomized complete block design, 251, 368 随机化完全区组设计randomness, test for, 242 随机,检验range, 37 极差interquartile, 37 四分位数间的rank correlation, 312 秩相关Kendall’s test for, 175, 321 Kendall检验spearman’s test for, 175, 316 Spearman检验rank of an order statistic, 77 次序统计量的秩rank transformation, 417 秩变换ranks: 秩covariance of two, 45 两随机变量的协方差mean of sum of, 41, 49 和的均值ratio scale of measurement, 75 测量的比率尺度region: 域acceptance, 98 接受critical, 97, 98, 101 临界rejection, 98 拒绝regression, 328, 332 回归equation, 332 方程linear, 333 线性monotonic, 344 单调multiple, 419 多元parallelism of two lines, 364 两线平行rejection region, 98 拒绝域relative efficiency, 110, 111, 112 相对效率asymptotic, 112 渐近Resampling Stats, v, 88 重抽样research hypothesis, 95 假设研究rho, Spearman’s, 314, 325, 326, 335 rho, Spearman relationship with Friedman’s test, 382 与Friedman检验的关系robust, 419, 420 稳健location estimates, 362 局部估计methods, 115, 119 方法runs tests, 3 游动检验S-Plus, v, 88, 91, 127, 130, 168, 182189, 193, 201, 205, 210, 241, 276, 290, 318, 322, 355, 371, 432, 444, 449sample, 68, 69 样本censored, 155, 285 删失convenience, 69 方便distribution function, 79, 80 分布函数mean, 81, 83 均值mean, unbiased for μ, 84 均值,对μ无偏median, 82 中位数normalized,443 正则化probability, 69 概率quantile,81 分位数sequential, 362 序贯space, 13 空间point in the, 13 样本空间中的点standard deviation, 83 标准差variance, 81, 83 方差unbiased for σ2, 85 对σ2无偏sampled population, 69, 70 抽样总体SAS, v, 168, 182, 189, 193, 201, 205, 210, 230, 259, 276, 290, 322, 325, 355, 371, 390, 451 scale,measure of, 37 刻度(尺度), 度量scale,tests for, 309, 310 刻度,检验scale, measurement, 73 刻度, 测量scorses, 306 得分expected normal, 404 期望正态F statistic computed on, 312 计算F统计量mean in rank test using, 306 均值的秩检验normal, 396 正态variance in rank test using, 307 方差的秩检验sequential sampling, 362 序贯抽样sequential testing, 285 序贯检验set, empty, 14 集合,空集Shapiro-Wilk test for normality, 450 Shapiro-Wilk正态检验Siegel-Tukey test, 312 Siegel-Tukey检验sign test, 157 符号检验consistent, 163 相合for correlation, 172 相关性efficiency of, 364 效率for equal means, 160 等均值for equal medians, 160 等中位数extension to k samples of, 367 推广到k样本unbiased, 163 无偏variations of, 166, 175 方差vs. t test, A.R.E. of, 164, 175 vs. t检验,A.R.E. vs. Wilcoxon signed ranks test, A.R.E of, 164, 175 vs. Wilcoxonf符号秩检验,A.R.E signed ranks test, Wilcoxon, 352 符号秩检验,Wilcoxon significance, level of, 99 显著,水平simple hypothesis, 97 简单假设simulation, computer, to find null distribution, 446, 447 模拟,计算机, 求零假设分布size of the critical region, 100 临界域的大小slope, A.R.E. of rank test for, 335 斜率, A.R.E.秩检验slope in linear regression, 333 线性回归的斜率confidence interval for, 335 置信区间testing the, 335 检验Smirnov test, 456, Smirnov检验efficiency of, 465 效率exact tables, 558-560 精确表Smirnov-type tests for several samples, 462 多样本Smirnov型检验Spearman’s foottrule, 331 Spearman 脚规则Spearman’s rank correlation test, 175, 316 Spearman秩相关检验A.R.E. of, 327 A.R.E.exact tables, 544 精确表Spearman’s rho, 314, 325, 326, 335 Spearman’s rhofor ordered alternatives, 380 顺序备择relationship with Friedman’s test, 382 与Friedman检验的关系split plots, 385 裂区SPSS, v, 382, 390squared ranks test for variances, 300 方差的平方秩检验exact tables for, 542-543 精确表standard deviation, 37, 38 标准差estimation of, 443 估计of hypergeometric distribution, 188, 191 超几何分布population, estimator of, 115 总体,估计量sample, 83 样本standard error, 85, 88 标准差standard normal distribution, 55 标准正态分布STA TA, v, 88statistic, 75, 76 统计量order, 77, 82 次序test, 35,96, 97 检验STA TISTUICA, vstatistical inference, 68 统计推断statistics, 68 统计学StatMost, v, 259StatXact, v, 104, 127, 130, 144, 161, 168, 182, 189, 201, 205, 210, 220, 230, 241, 252, 276, 282, 290, 303, 318, 322, 325, 355, 361, 371, 375, 380, 382, 387, 399, 400, 401, 408, 409, 413, 432, 435, 444, 451, 459stem and leaf method, 270 茎叶方法step function, 52 阶梯函数stratified samples, 362 分层样本sum of chi-squared random variables, 62 χ2随机变量的和sum of integers formula, 40 整数和公式sum of random variables: 随机变量和mean of, 39 均值variance of, 48 方差sum of squared integers formula,43 整数平方和公式sure event, 14 必然事件survival curves, 119 生存曲线survival function, 89 生存函数empirical, 89 经验symmetric distributions, 350, 351 对称分布symmetry, Smirnov test for, 465 对称性,Smirnov检验symmetry, tests for, 364 对称性,检验SYSTA T, v, 88, 91, 259t distribution, table, 561 t分布,表格t statistic computed on ranks, 367 基于秩计算的t统计量t test: t检验,efficiency of paired, 364 配对效率one sample, 363, 418 一样本paired, 363 配对two sample, 284, 417 两样本table,contingency, 166, 179, 292 表,列联target population, 69, 70 目标总体tau, Kendall’s, 318, 319, 325, 326, 335 tau, Kendall test, conservative, 113 检验, 保守的test, hypothesis, 95 检验,假设test, one tailed, 98 检验,单边test, statistic, 3, 96, 97 检验,统计量test,unbiased, 106, 108, 160 检验,无偏testing hypotheses, 95 假设检验tests, consistent sequence of, 106, 108, 160 检验,相合序列three-way contingency table, 214 三种方式列联表tolerance limits, 150 容忍限approximation formulas for, 151, 155 逼近公式exact tables for, 537 精确表tansformation, rank, 417 变换,秩trend: 趋势Cox and Stuart test for, 169, 170 Cox和Stuart检验Daniel’s test for, 232 Daniel检验trials, 6 基本试验Tschuprow’s coefficient, 232 Tschuprow系数two independent samples, randomization test for, 409 两独立样本,随机化检验two-sample Cramér-von Mises test, 463 两样本Cramér-von Mises检验two-sample t test, 198 两样本t检验two-tailed test, 98 双边t检验two-way contingency table, 214 两种方式列联表typ eⅠerror , 98 一类错误typ eⅡerror, 98, 99 二类错误unbiased estimator, 84, 94 无偏估计量unbiased, sign test, 163 无偏,符号检验unbiased test, 106, 108, 160 无偏检验uniform distribution: 均匀分布continuous, 433 连续discrete, 28, 437 离散upper-tailed test, 98 右边检验value, expected,35, 39 值,期望van der Waerden test, 397 van der Waerden检验variable, random, 22, 23, 76 变量,随机variance, 36, 37 方差in binomial distribution, 49 二项分布multiple comparisons for test for, 304 检验的多重比较in rank test using scores, 307 得分秩检验sample, 81, 83 样本squared ranks test for, 300 平方秩检验of sum of random variables, 48 随机变量的和of sum of ranks, 48, 49 秩和tests for, 309 检验variations of the sign test, 166, 175 符号检验的变差Walsh test, 364 Walsh检验websites, Internet, v 网址,因特耐特网Wilcoxon signed ranks test, 164, 352, 411 Wilcoxon符号秩检验continuity correction in, 359 连续相关efficiency of, 364 效率extension to k samples of, 367 推广到k个样本normal approximation in, 353, 359 正态逼近tables, 547-548 表格Wilcoxon test, 103 Wilcoxon检验Wilcoxon two-sample test, 271 Wilcoxon两样本检验。
Package‘dgof’October13,2022Version1.4Date2022-07-16Title Discrete Goodness-of-Fit TestsAuthor Taylor B.Arnold,John W.Emerson,R Core Team and contributorsworldwideMaintainer Taylor B.Arnold<*************************>Description A revision to the stats::ks.test()function and the associatedks.test.Rd help page.With one minor exception,it does not change theexisting behavior of ks.test(),and it adds features necessaryfor doing one-sample tests with hypothesized discretedistributions.The package also contains cvm.test(),for doingone-sample Cramer-von Mises goodness-of-fit tests.License GPL(>=2.0)LazyLoad yesNeedsCompilation yesRepository CRANDate/Publication2022-06-1616:50:02UTCR topics documented:cvm.test (1)ks.test (3)Index8 cvm.test Discrete Cramer-von Mises Goodness-of-Fit TestsDescriptionComputes the test statistics for doing one-sample Cramer-von Mises goodness-of-fit tests and cal-culates asymptotic p-values.12cvm.testUsagecvm.test(x,y,type=c("W2","U2","A2"),simulate.p.value=FALSE,B=2000,tol=1e-8)Argumentsx a numerical vector of data values.y an ecdf or step-function(stepfun)for specifying the hypothesized model.type the variant of the Cramer-von Mises test;"W2"is the default and most common method,"U2"is for cyclical data,and"A2"is the Anderson-Darling alternative.For details see references.simulate.p.valuea logical indicating whether to compute p-values by Monte Carlo simulation.B an integer specifying the number of replicates used in the Monte Carlo test(fordiscrete goodness-of-fit tests only).tol used as an upper bound for possible rounding error in values(say,a and b)when needing to check for equality(a==b)(for discrete goodness-of-fit tests only).DetailsWhile the Kolmogorov-Smirnov test may be the most popular of the nonparametric goodness-of-fit tests,Cramer-von Mises tests have been shown to be more powerful against a large class of alternatives hypotheses.The original test was developed by Harald Cramer and Richard von Mises (Cramer,1928;von Mises,1928)and further adapted by Anderson and Darling(1952),and Watson (1961).ValueAn object of class htest.NoteAdditional notes?Author(s)Taylor B.Arnold and John W.EmersonMaintainer:Taylor B.Arnold<**********************>ReferencesT.W.Anderson and D.A.Darling(1952).Asymptotic theory of certain"goodness offit"criteria based on stochastic processes.Annals of Mathematical Statistics,23:193-212.V.Choulakian,R.A.Lockhart,and M.A.Stephens(1994).Cramer-von Mises statistics for discrete distributions.The Canadian Journal of Statistics,22(1):125-137.H.Cramer(1928).On the composition of elementary errors.Skand.Akt.,11:141-180.M.A.Stephens(1974).Edf statistics for goodness offit and some comparisons.Journal of the American Statistical Association,69(347):730-737.R.E.von Mises(1928).Wahrscheinlichkeit,Statistik und Wahrheit.Julius Springer,Vienna,Aus-tria.G.S.Watson(1961).Goodness offit tests on the circle.Biometrika,48:109-114.See Alsoks.test,ecdf,stepfunExamplesrequire(dgof)x3<-sample(1:10,25,replace=TRUE)#Using ecdf()to specify a discrete distribution:ks.test(x3,ecdf(1:10))cvm.test(x3,ecdf(1:10))#Using step()to specify the same discrete distribution:myfun<-stepfun(1:10,cumsum(c(0,rep(0.1,10))))ks.test(x3,myfun)cvm.test(x3,myfun)#Usage of U2for cyclical distributions(note U2unchanged,but W2not)set.seed(1)y<-sample(1:4,20,replace=TRUE)cvm.test(y,ecdf(1:4),type= W2 )cvm.test(y,ecdf(1:4),type= U2 )z<-ycvm.test(z,ecdf(1:4),type= W2 )cvm.test(z,ecdf(1:4),type= U2 )#Compare analytic results to simulation resultsset.seed(1)y<-sample(1:3,10,replace=TRUE)cvm.test(y,ecdf(1:6),simulate.p.value=FALSE)cvm.test(y,ecdf(1:6),simulate.p.value=TRUE)ks.test Kolmogorov-Smirnov TestsDescriptionPerforms one or two sample Kolmogorov-Smirnov tests.Usageks.test(x,y,...,alternative=c("two.sided","less","greater"),exact=NULL,tol=1e-8,simulate.p.value=FALSE,B=2000)Argumentsx a numeric vector of data values.y a numeric vector of data values,or a character string naming a cumulative dis-tribution function or an actual cumulative distribution function such as pnorm.Alternatively,y can be an ecdf function(or an object of class stepfun)forspecifying a discrete distribution....parameters of the distribution specified(as a character string)by y.alternative indicates the alternative hypothesis and must be one of"two.sided"(default), "less",or"greater".You can specify just the initial letter of the value,butthe argument name must be give in full.See‘Details’for the meanings of thepossible values.exact NULL or a logical indicating whether an exact p-value should be computed.See ‘Details’for the meaning of NULL.Not used for the one-sided two-sample case.tol used as an upper bound for possible rounding error in values(say,a and b)when needing to check for equality(a==b);value of NA or0does exact comparisonsbut risks making errors due to numerical imprecisions.simulate.p.valuea logical indicating whether to compute p-values by Monte Carlo simulation,fordiscrete goodness-of-fit tests only.B an integer specifying the number of replicates used in the Monte Carlo test(fordiscrete goodness-of-fit tests only).DetailsIf y is numeric,a two-sample test of the null hypothesis that x and y were drawn from the same continuous distribution is performed.Alternatively,y can be a character string naming a continuous(cumulative)distribution function(or such a function),or an ecdf function(or object of class stepfun)giving a discrete distribution.Inthese cases,a one-sample test is carried out of the null that the distribution function which generated x is distribution y with parameters specified by....The presence of ties generates a warning unless y describes a discrete distribution(see above),sincecontinuous distributions do not generate them.The possible values"two.sided","less"and"greater"of alternative specify the null hy-pothesis that the true distribution function of x is equal to,not less than or not greater than thehypothesized distribution function(one-sample case)or the distribution function of y(two-samplecase),respectively.This is a comparison of cumulative distribution functions,and the test statisticis the maximum difference in value,with the statistic in the"greater"alternative being D+=max u[F x(u)−F y(u)].Thus in the two-sample case alternative="greater"includes distribu-tions for which x is stochastically smaller than y(the CDF of x lies above and hence to the left ofthat for y),in contrast to t.test or wilcox.test.Exact p-values are not available for the one-sided two-sample case,or in the case of ties if y iscontinuous.If exact=NULL(the default),an exact p-value is computed if the sample size is lessthan100in the one-sample case with y continuous or if the sample size is less than or equal to30with y discrete;or if the product of the sample sizes is less than10000in the two-samplecase for continuous y.Otherwise,asymptotic distributions are used whose approximations maybe inaccurate in small samples.With y continuous,the one-sample two-sided case,exact p-valuesare obtained as described in Marsaglia,Tsang&Wang(2003);the formula of Birnbaum&Tingey(1951)is used for the one-sample one-sided case.In the one-sample case with y discrete,the methods presented in Conover(1972)and Gleser(1985)are used when exact=TRUE(or when exact=NULL)and length(x)<=30as described above.When exact=FALSE or exact=NULL with length(x)>30,the test is not exact and the resulting p-values are known to be age of exact=TRUE with sample sizes greater than30is not adviseddue to numerical instabilities;in such cases,simulated p-values may be desirable.If a single-sample test is used with y continuous,the parameters specified in...must be pre-specified and not estimated from the data.There is some more refined distribution theory for theKS test with estimated parameters(see Durbin,1973),but that is not implemented in ks.test. ValueA list with class"htest"containing the following components:statistic the value of the test statistic.p.value the p-value of the test.alternative a character string describing the alternative hypothesis.method a character string indicating what type of test was performed. a character string giving the name(s)of the data.Author(s)Modified by Taylor B.Arnold and John W.Emerson to include one-sample testing with a discretedistribution(as presented in Conover’s1972paper–see references).ReferencesZ.W.Birnbaum and Fred H.Tingey(1951),One-sided confidence contours for probability distri-bution functions.The Annals of Mathematical Statistics,22/4,592–596.William J.Conover(1971),Practical Nonparametric Statistics.New York:John Wiley&Sons.Pages295–301(one-sample Kolmogorov test),309–314(two-sample Smirnov test).William J.Conover(1972),A Kolmogorov Goodness-of-Fit Test for Discontinuous Distributions.Journal of American Statistical Association,V ol.67,No.339,591–596.Leon Jay Gleser(1985),Exact Power of Goodness-of-Fit Tests of Kolmogorov Type for Discontin-uous Distributions.Journal of American Statistical Association,V ol.80,No.392,954–958.Durbin,J.(1973)Distribution theory for tests based on the sample distribution function.SIAM.George Marsaglia,Wai Wan Tsang and Jingbo Wang(2003),Evaluating Kolmogorov’s distribution.Journal of Statistical Software,8/18.https:///v08/i18/.See Alsoshapiro.test which performs the Shapiro-Wilk test for normality;cvm.test for Cramer-von Mises type tests.Examplesrequire(graphics)require(dgof)set.seed(1)x<-rnorm(50)y<-runif(30)#Do x and y come from the same distribution?ks.test(x,y)#Does x come from a shifted gamma distribution with shape3and rate2?ks.test(x+2,"pgamma",3,2)#two-sided,exactks.test(x+2,"pgamma",3,2,exact=FALSE)ks.test(x+2,"pgamma",3,2,alternative="gr")#test if x is stochastically larger than x2x2<-rnorm(50,-1)plot(ecdf(x),xlim=range(c(x,x2)))plot(ecdf(x2),add=TRUE,lty="dashed")t.test(x,x2,alternative="g")wilcox.test(x,x2,alternative="g")ks.test(x,x2,alternative="l")##########################################################TBA,JWE new examples added for discrete distributions:x3<-sample(1:10,25,replace=TRUE)#Using ecdf()to specify a discrete distribution:ks.test(x3,ecdf(1:10))#Using step()to specify the same discrete distribution: myfun<-stepfun(1:10,cumsum(c(0,rep(0.1,10))))ks.test(x3,myfun)#The previous R ks.test()does not correctly calculate the #test statistic for discrete distributions(gives warning): #stats::ks.test(c(0,1),ecdf(c(0,1)))#ks.test(c(0,1),ecdf(c(0,1)))#Even when the correct test statistic is given,the#previous R ks.test()gives conservative p-values: stats::ks.test(rep(1,3),ecdf(1:3))ks.test(rep(1,3),ecdf(1:3))ks.test(rep(1,3),ecdf(1:3),simulate=TRUE,B=10000)Index∗htestcvm.test,1ks.test,3cvm.test,1,6ecdf,2–4ks.test,3,3shapiro.test,6stepfun,2–4t.test,5wilcox.test,58。
Class 5: ANOVA (Analysis of Variance) and F-testsI. What is ANOVAWhat is ANOVA? ANOVA is the short name for the Analysis of Variance. The essenceof ANOVA is to decompose the total variance of the dependent variable into two additive components, one for the structural part, and the other for the stochastic part, of a regression. Today we are going to examine the easiest case.II. ANOVA: An IntroductionLet the model beεβ+= X y .Assuming x i is a column vector (of length p) of independent variable values for the i th'observation,i i i εβ+='x y .Then b 'x i is the predicted value.sum of squares total:[]∑-=2Y y SST i []∑-+-=2'x b 'x y Y b i i i[][][][]∑∑∑-+-+-=Y -b 'x b 'x y 2Y b 'x b 'x y 22i i i i i i[][]∑∑-+=22Y b 'x e i ibecause [][][]∑∑=-=--0Y b 'x e Y b 'x b 'x y ii i i i .This is always true by OLS. = SSE + SSRImportant: the total variance of the dependent variable is decomposed into two additive parts: SSE, which is due to errors, and SSR, which is due to regression. Geometric interpretation: [blackboard ]Decomposition of VarianceIf we treat X as a random variable, we can decompose total variance to the between-group portion and the within-group portion in any population:()()()i i i x y εβV 'V V +=Prove:()()i i i x y εβ+='V V()()()i i i i x x εβεβ,'Cov 2V 'V ++=()()iix εβV 'V +=(by the assumption that ()0 ,'Cov =εβk x , for all possible k.)The ANOVA table is to estimate the three quantities of equation (1) from the sample.As the sample size gets larger and larger, the ANOVA table will approach the equation closer and closer.In a sample, decomposition of estimated variance is not strictly true. We thus need toseparately decompose sums of squares and degrees of freedom. Is ANOVA a misnomer?III. ANOVA in MatrixI will try to give a simplied representation of ANOVA as follows:[]∑-=2Y y SST i ()∑-+=i i y Y 2Y y 22∑∑∑-+=i i y Y 2Y y 22∑-+=222Y n 2Y n y i (because ∑=Y n y i )∑-=22Y n y i2Y n y 'y -=y J 'y n /1y 'y -= (in your textbook, monster look)SSE = e'e[]∑-=2Y b 'x SSR i()()[]∑-+=Y b 'x 2Y b 'x 22i i()[]()∑∑-+=b 'x Y 2Y n b 'x 22i i()[]()∑∑--+=i i i e y Y 2Y n b 'x 22()[]∑-+=222Y n 2Y n b 'x i(because ∑∑==0e ,Y n y i i , as always)()[]∑-=22Yn b 'x i2Y n Xb X'b'-=y J 'y n /1y X'b'-= (in your textbook, monster look)IV. ANOVA TableLet us use a real example. Assume that we have a regression estimated to be y = - 1.70 + 0.840 xANOVA TableSOURCE SS DF MS F with Regression 6.44 1 6.44 6.44/0.19=33.89 1, 18Error 3.40 18 0.19 Total 9.8419We know∑=100xi, ∑=50y i , 12.509x 2=∑i , 84.134y 2=∑i , ∑=66.257y x i i . If weknow that DF for SST=19, what is n?n= 205.220/50Y ==84.95.25.22084.134Y n y SST 22=⨯⨯-=-=∑i()[]∑-+=0.1250.84x 1.7-SSR 2i[]∑-⨯⨯⨯-⨯+⨯=0.125x 84.07.12x 84.084.07.17.12i i= 20⨯1.7⨯1.7+0.84⨯0.84⨯509.12-2⨯1.7⨯0.84⨯100- 125.0= 6.44SSE = SST-SSR=9.84-6.44=3.40DF (Degrees of freedom): demonstration. Note: discounting the intercept when calculating SST. MS = SS/DFp = 0.000 [ask students]. What does the p-value say?V. F-TestsF-tests are more general than t-tests, t-tests can be seen as a special case of F-tests.If you have difficulty with F-tests, please ask your GSIs to review F-tests in the lab. F-tests takes the form of a fraction of two MS's.MSR/MSE F , df2df1An F statistic has two degrees of freedom associated with it: the degree of freedom inthe numerator, and the degree of freedom in the denominator.An F statistic is usually larger than 1. The interpretation of an F statistics is thatwhether the explained variance by the alternative hypothesis is due to chance. In other words, the null hypothesis is that the explained variance is due to chance, or all the coefficients are zero.The larger an F-statistic, the more likely that the null hypothesis is not true. There is atable in the back of your book from which you can find exact probability values.In our example, the F is 34, which is highly significant.VI. R 2R 2 = SSR / SSTThe proportion of variance explained by the model. In our example, R-sq = 65.4%VII. What happens if we increase more independent variables.1. SST stays the same.2. SSR always increases.3. SSE always decreases.4. R 2 always increases.5. MSR usually increases.6. MSE usually decreases.7. F-test usually increases.Exceptions to 5 and 7: irrelevant variables may not explain the variance but take up degrees of freedom. We really need to look at the results.VIII. Important: General Ways of Hypothesis Testing with F-Statistics.All tests in linear regression can be performed with F-test statistics. The trick is to run"nested models."Two models are nested if the independent variables in one model are a subset or linearcombinations of a subset (子集)of the independent variables in the other model.That is to say. If model A has independent variables (1, 1x , 2x ), and model B hasindependent variables (1, 1x , 2x ,3x ), A and B are nested. A is called the restricted model; B is called less restricted or unrestricted model. We call A restricted because A implies that0=3β. This is a restriction.Another example: C has independent variable (1, 1x , 2x +3x ), D has (1, 2x +3x ). C and A are not nested.C and B are nested. One restriction in C: 32ββ=.C andD are nested. One restriction in D: 0=1β. D and A are not nested.D and B are nested: two restriction in D: 32ββ=; 0=1β.We can always test hypotheses implied in the restricted models. Steps: run tworegression for each hypothesis, one for the restricted model and one for the unrestrictedmodel. The SST should be the same across the two models. What is different is SSE and SSR. That is, what is different is R 2. Let()()df df SSE ,df df SSE u u r r ==;df df ()()0u r u r r u n p n p p p -=---=-<Use the following formulas:()()()()(),SSE SSE /df SSE df SSE F SSE /df r u r u dfr dfu dfu u u---=or()()()()(),SSR SSR /df SSR df SSR F SSE /df u r u r dfr dfu dfu u u---=(proof: use SST = SSE+SSR)Note, df(SSE r )-df(SSE u ) = df(SSR u )-df(SSR r ) =df ∆,is the number of constraints (not number of parameters) implied by the restricted modelor()()()22,2R R /df F 1R /dfur dfr dfu dfuuu--∆=- Note thatdf 1df ,2F t =That is, for 1df tests, you can either do an F-test or a t-test. They yield the same result. Another way to look at it is that the t-test is a special case of the F test, with the numerator DF being 1.IX. Assumptions of F-testsWhat assumptions do we need to make an ANOVA table work?Not much an assumption. All we need is the assumption that (X'X) is not singular, so that the least square estimate b exists.The assumption of ε'X =0 is needed if you want the ANOVA table to be an unbiased estimate of the true ANOVA (equation 1) in the population. Reason: we want b to be an unbiased estimator of β, and the covariance between b and εto disappear.For reasons I discussed earlier, the assumptions of homoscedasticity and non-serial correlation are necessary for the estimation of ()i V ε.The normality assumption that εi is distributed in a normal distribution is needed for small samples.X. The Concept of IncrementEvery time you put one more independent variable into your model, you get an increase in 2R . We sometime called the increase "incremental 2R ." What is means is that more variance is explained, or SSR is increased, SSE is reduced. What you should understand is that the incremental 2R attributed to a variable is always smaller than the 2R when other variables are absent.XI. Consequences of Omitting Relevant Independent VariablesSay the true model is the following:0112233i i i i i y x x x ββββε=++++.But for some reason we only collect or consider data on 21,,x and x y . Therefore, we omit3x in the regression. That is, we omit in 3x our model. We briefly discussed this problembefore. The short story is that we are likely to have a bias due to the omission of a relevant variable in the model. This is so even though our primary interest is to estimate the effect of1x or 2x on y.Why? We will have a formal presentation of this problem.XII. Measures of Goodness-of-FitThere are different ways to assess the goodness-of-fit of a model. A. R 2R 2 is a heuristic measure for the overall goodness-of-fit. It does not have an associated test statistic.R 2 measures the proportion of the variance in the dependent variable that is “explained” by the model: R 2 =SSESSR SSRSST SSR +=B. Model F-testThe model F-test tests the joint hypotheses that all the model coefficients except for the constant term are zero.Degrees of freedoms associated with the model F-test: Numerator: p-1 Denominator: n-p.C. t-tests for individual parametersA t-test for an individual parameter tests the hypothesis that a particular coefficient is equal to a particular number (commonly zero).t k = (b k - βk0)/SE k , where SE k is the (k, k) element of MSE(X’X)-1, with degree of freedom=n-p. D. Incremental R 2Relative to a restricted model, the gain in R 2 for the unrestricted model: ∆R 2= R u 2- R r 2E. F-tests for Nested ModelIt is the most general form of F-tests and t-tests.()()()()(),SSE SSE /df SSE df SSE F SSE /df r u r dfu dfr u dfu u u---=It is equal to a t-test if the unrestricted and restricted models differ only by one single parameter.It is equal to the model F-test if we set the restricted model to the constant-only model.[Ask students] What are SST, SSE, and SSR, and their associated degrees of freedom, for the constant-only model?Numerical ExampleA sociological study is interested in understanding the social determinants of mathematicalachievement among high school students. You are now asked to answer a series of questions. The data are real but have been tailored for educational purposes. The total number of observations is 400. The variables are defined as: y: math scorex1: father's education x2: mother's educationx3: family's socioeconomic status x4: number of siblings x5: class rankx6: parents' total education (note: x6 = x1 + x2) For the following regression models, we know: Table 1 SST SSR SSE DF R 2 (1) y on (1 x1 x2 x3 x4) 34863 4201 (2) y on (1 x6 x3 x4) 34863 396 .1065 (3) y on (1 x6 x3 x4 x5) 34863 10426 24437 395 .2991 (4) x5 on (1 x6 x3 x4) 269753 396 .02101. Please fill the missing cells in Table 1.2. Test the hypothesis that the effects of father's education (x1) and mother's education (x2) on math score are the same after controlling for x3 and x4.3. Test the hypothesis that x6, x3 and x4 in Model (2) all have a zero effect on y.4. Can we add x6 to Model (1)? Briefly explain your answer.5. Test the hypothesis that the effect of class rank (x5) on math score is zero after controlling for x6, x3, and x4.Answer: 1. SST SSR SSE DF R 2 (1) y on (1 x1 x2 x3 x4) 34863 4201 30662 395 .1205 (2) y on (1 x6 x3 x4) 34863 3713 31150 396 .1065 (3) y on (1 x6 x3 x4 x5) 34863 10426 24437 395 .2991 (4) x5 on (1 x6 x3 x4) 275539 5786 269753 396 .0210Note that the SST for Model (4) is different from those for Models (1) through (3). 2.Restricted model is 01123344()y b b x x b x b x e =+++++Unrestricted model is ''''''011223344y b b x b x b x b x e =+++++(31150 - 30662)/1F 1,395 = -------------------- = 488/77.63 = 6.29 30662 / 395 3.3713 / 3F 3,396 = --------------- = 1237.67 / 78.66 = 15.73 31150 / 3964. No. x6 is a linear combination of x1 and x2. X'X is singular.5.(31150 - 24437)/1F 1,395 = -------------------- = 6713 / 61.87 = 108.50 24437/395t = 10.42t ===。
Package‘FitUltD’October12,2022Type PackageTitle Fit Univariate Mixed and Usual DistributionsVersion3.1.0Author JoséCarlos Del Valle<*****************>Maintainer JoséCarlos Del Valle<*****************>Description Extends thefitdist()(from'fitdistrplus')adding the Anderson-Darling ad.test()(from'AD-GofTest')and Kolmogorov Smirnov Test ks.test()inside,trying the distributions from'stats'pack-age by default and offering a second function which uses mixed distributions tofit,this distribu-tions are split with unsupervised learning,with Mclust()function(from'mclust').License GPL-3Encoding UTF-8LazyData trueDepends R(>=3.2.0),mclustImports ADGofTest,fitdistrplus,assertthat,MASS,purrr,ggplot2,cowplot,methods,statsRoxygenNote6.1.1URL https:///jcval94/FitUltDBugReports https:///jcval94/FitUltD/issuesNeedsCompilation noRepository CRANDate/Publication2019-09-1113:30:02UTCR topics documented:FDist (2)FDistUlt (3)Index512FDist FDist Fit of univariate distributions with censored data ignored by defaultor can be inputed.DescriptionFit of univariate distributions with censored data ignored by default or can be inputed.UsageFDist(X,gen=1,Cont=TRUE,inputNA,plot=FALSE,p.val_min=0.05,crit=2,DPQR=TRUE)ArgumentsX A random sample to befitted.gen A positive integer,indicates the sample length to be generated by thefit,1by default.Cont TRUE,by default the distribution is considered as continuos.inputNA A number to replace censored values,if is missing,only non-censored values will be evaluated.plot FALSE.If TRUE,a plot showing the data distribution will be given.p.val_min0.05,minimum p.value for Anderson Darling and KS Test to non-reject the null hypothesis and continue with the process.crit A positive integer to define which test will use.If1,show the distributions which were non-rejected by the Anderson Darling or Kolmogorov Smirnov tests,inother cases the criterion is that they mustn’t be rejected by both tests.DPQR TRUE,creates the distribution function,density and quantile function with the names dfit,pfit and qfit.ValueCalculate the distribution name with parameters,a function to reproduce random values from that distribution,a numeric vector of random numbers from that function,Anderson Darling and KS p.values,a plot showing the distribution difference between the real sample and the generated values and a list with the random deviates genetator,the distribution function,density and quantile function Examplesset.seed(31109)FIT1<-FDist(rnorm(1000,10),p.val_min=.03,crit=1,plot=TRUE)#Random VariableFIT1[[1]]#Random numbers generatorFIT1[[2]]()#Random sampleFIT1[[3]]#Goodness of fit tests resultsFIT1[[4]]#PlotFIT1[[5]]#Functions r,p,d,qFIT1[[6]]FDistUlt Fits a set of observations(random variable)to test whether is drawnfrom a certain distributionDescriptionFits a set of observations(random variable)to test whether is drawn from a certain distributionUsageFDistUlt(X,n.obs=length(X),ref="OP",crt=1,plot=FALSE,subplot=FALSE,p.val_min=0.05)ArgumentsX A random sample to befitted.n.obs A positive integer,is the length of the random sample to be generatedref Aumber of clusters to use by the kmeans function to split the distribution,if isn’ta number,uses mclust classification by default.crt Criteria to be given to FDist()functionplot FALSE.If TRUE,generates a plot of the density function.subplot FALSE.If TRUE,generates the plot of the mixed density function’s partitions.p.val_min Minimum p.value to be given to non-reject the null hypothesis.ValueA list with the density functions,a random sample,a data frame with the KS and AD p.valuesresults,the corresponding plots an the random numbers generator functionsExamplesset.seed(31109)X<-c(rnorm(193,189,12),rweibull(182,401,87),rgamma(190,40,19)) A_X<-FDistUlt(X,plot=TRUE,subplot=TRUE)A_X<-FDistUlt(X,plot=TRUE,subplot=TRUE,p.val_min=.005)#Functions generatedA_X[[1]][[1]]()#Random sampleA_X[[2]]#DistributionsA_X[[3]]#Plotspar(mfrow=c(1,2))A_X[[4]][[1]]A_X[[4]][[2]]#More functionsA_X[[5]][[1]]()IndexFDist,2FDistUlt,35。
Package‘EMT’February6,2023Type PackageTitle Exact Multinomial Test:Goodness-of-Fit Test for DiscreteMultivariate DataVersion1.3Date2023-02-06Author Uwe MenzelMaintainer Uwe Menzel<*******************>Description Goodness-of-fit tests for discrete multivariate data.It istested if a given observation is likely to have occurred underthe assumption of an ab-initio model.Monte Carlo methods are provided tomake the package capable of solving high-dimensional problems.License GPLLazyLoad yesRepository CRANDate/Publication2023-02-0622:32:31UTCNeedsCompilation noR topics documented:EMT-package (2)EMT-internal (2)multinomial.test (3)plotMultinom (6)Index712EMT-internalEMT-package Exact Multinomial Test:Goodness-of-Fit Test for Discrete Multivari-ate DataDescriptionThe package provides functions to carry out a Goodness-of-fit test for discrete multivariate data.It is tested if a given observation is likely to have occurred under the assumption of an ab-initio model.A p-value can be calculated using different distance measures between observed and ex-pected frequencies.A Monte Carlo method is provided to make the package capable of solving high-dimensional problems.The main user functions are multinomial.test and plotMultinom.DetailsPackage:CCPType:PackageVersion: 1.3Date:2013-02-06License:GPLAuthor(s)Uwe MenzelMaintainer:Uwe Menzel<*******************>EMT-internal Internal functions for the EMT packageDescriptionInternal functions for the EMT packageUsageExactMultinomialTest(observed,prob,size,groups,numEvents)ExactMultinomialTestChisquare(observed,prob,size,groups,numEvents)MonteCarloMultinomialTest(observed,prob,size,groups,numEvents,ntrial,atOnce)MonteCarloMultinomialTestChisquare(observed,prob,size,groups,numEvents,ntrial,atOnce)chisqStat(observed,expected)findVectors(groups,size)Argumentsobserved vector describing the observation:contains the observed numbers of items in each category.prob vector describing the model:contains the hypothetical probabilities correspond-ing to each category.expected vector containing the expected numbers of items in each category under the assumption that the model is valid.size sample size,sum of the components of the vector observed.groups number of categories in the experiment.numEvents number of possible outcomes of the experiment.ntrial number of simulated samples in the Monte Carlo approach.atOnce a parameter of more technical nature.Determines how much memory is used for big arrays.DetailsThese functions are not intended to be called by the user.multinomial.test Exact Multinomial Test:Goodness-of-Fit Test for Discrete Multivari-ate DataDescriptionGoodness-of-fit tests for discrete multivariate data.It is tested if a given observation is likely to have occurred under the assumption of an ab-initio model.Monte Carlo methods are provided to make the function capable of solving high-dimensional problems.Usagemultinomial.test(observed,prob,useChisq=FALSE,MonteCarlo=FALSE,ntrial=1e6,atOnce=1e6)Argumentsobserved vector describing the observation:contains the observed numbers of items in each category.prob vector describing the model:contains the hypothetical probabilities correspond-ing to each category.useChisq if TRUE,Pearson’s chisquare is used as a distance measure between observed and expected frequencies.MonteCarlo if TRUE,a Monte Carlo approach is used.ntrial number of simulated samples in the Monte Carlo approach.atOnce a parameter of more technical nature.Determines how much memory is used for big arrays.DetailsThe Exact Multinomial Test is a Goodness-of-fit test for discrete multivariate data.It is tested ifa given observation is likely to have occurred under the assumption of an ab-initio model.In theexperimental setup belonging to the test,n items fall into k categories with certain probabilities (sample size n with k categories).The observation,described by the vector observed,indicates how many items have been observed in each category.The model,determined by the vector prob, assigns to each category the hypothetical probability that an item falls into it.Now,if the obser-vation is unlikely to have occurred under the assumption of the model,it is advisible to regard the model as not valid.The p-value estimates how likely the observation is,given the model.In particular,low p-values suggest that the model is not valid.The default approach used by multinomial.test obtains the p-values by calculating the exact probabilities of all possible out-comes given n and k,using the multinomial probability distribution function dmultinom provided by R.Then,by default,the p-value is obtained by summing the probabilities of all outcomes which are less likely than the observed outcome(or equally likely as the observed outcome),i.e.by summing all p(i)<=p(observed)(distance measure based on probabilities).Alternatively,the p-value can be obtained by summing the probabilities of all outcomes connected with a chisquare no smaller than the chisquare connected with the actual observation(distance measure based on chisquare).The latter is triggered by setting useChisq=TRUE.Having a sample of size n in an experiment with k categories,the number of distinct possible outcomes is the binomial coefficient choose(n+k-1,k-1).This number grows rapidly with increasing parameters n and k.If the param-eters grow too big,numerical calculation might fail because of time or memory limitations.In this case,usage of a Monte Carlo approach provided by multinomial.test is suggested.A Monte Carlo approach,activated by setting MonteCarlo=TRUE,simulates withdrawal of ntrial samples of size n from the hypothetical distribution specified by the vector prob.The default value for ntrial is100000but might be incremented for big n and k.The advantage of the Monte Carlo approach is that memory requirements and running time are essentially determined by ntrial but not by n or k.By default,the p-value is then obtained by summing the relative frequencies of occurrence of unusual outcomes,i.e.of outcomes occurring less frequently than the observed one(or equally frequent as the observed one).Alternatively,as above,Pearson’s chisquare can be used as a dis-tance measure by setting useChisq=TRUE.The parameter atOnce is of more technical nature,witha default value of1000000.This value should be decremented for computers with low memoryto avoid overflow,and can be incremented for large-CPU computers to speed up calculations.The parameter is only effective for Monte Carlo calculations.Valueid textual description of the method used.size sample size n,equals the sum of the components of the vector observed.groups number of categories k in the experiment,equals the number of components of the vector observed.numEvents number of different events for the model considered.stat textual description of the distance measure used.allProb vector containing the probabilities(rel.frequencies for the Monte Carlo ap-proach)of all possible outcomes(might be huge for big n and k).criticalValue the critical value of the hypothesis test.ntrial number of trials if the Monte Carlo approach was used,NULL otherwise.p.value the calculated p-value rounded to four significant digits.NoteFor two categories(k=2),the test is called Exact Binomial Test.Author(s)Uwe Menzel<*******************>ReferencesH.Bayo Lawal(2003)Categorical data analysis with SAS and SPSS applications,V olume1,Chap-ter3ISBN:978-0-8058-4605-8Read,T.R.C.and Cressie,N.A.C.(1988).Goodness-of-fit statistics for discrete multivariate data.Springer,New York.See AlsoThe Multinomial Distribution:dmultinomExamples##Load the EMT package:library(EMT)##Input data for a three-dimensional case:observed<-c(5,2,1)prob<-c(0.25,0.5,0.25)##Calculate p-value using default options:out<-multinomial.test(observed,prob)#p.value=0.0767##Plot the probabilities for each event:plotMultinom(out)##Calculate p-value for the same input using Pearson s chisquare:out<-multinomial.test(observed,prob,useChisq=TRUE)#p.value=0.0596;not the same!##Test the hypothesis that all sides of a dice have the same probabilities:prob<-rep(1/6,6)observed<-c(4,5,2,7,0,1)out<-multinomial.test(observed,prob)#p.value=0.0357->better get another dice!#the same problem using a Monte Carlo approach:##Not run:out<-multinomial.test(observed,prob,MonteCarlo=TRUE,ntrial=5e+6)##End(Not run)6plotMultinom plotMultinom Plot the Probability distribution fot the Exact Multinomial TestDescriptionThis function takes the results of multinomial.test as input and plots the calculated probability distribution.UsageplotMultinom(listMultinom)ArgumentslistMultinom a list created by running the function multinomial.test.DetailsThe function plotMultinom displays a barplot of the probabilities for the individual events.The probabilities are shown in descending order from the left to the right.Events contributing to the p-value are marked red.Plots are only made if the number of different events is lower than or equal to100and for low number of trials in Monte Carlo simulations.ValueThefirst argument(listMultinom)is returned without modification.Author(s)Uwe Menzel<*******************>See AlsoThe Multinomial Distribution:multinomial.testExamples##Load the EMT package:library(EMT)##input and calculation of p-values:observed<-c(5,2,1)prob<-c(0.25,0.5,0.25)out<-multinomial.test(observed,prob)#p.value=0.0767##Plot the probability distribution:plotMultinom(out)Index∗htestEMT-package,2multinomial.test,3plotMultinom,6∗multivariateEMT-package,2multinomial.test,3plotMultinom,6chisqStat(EMT-internal),2dmultinom,4,5EMT(EMT-package),2EMT-internal,2EMT-package,2ExactMultinomialTest(EMT-internal),2 ExactMultinomialTestChisquare(EMT-internal),2findVectors(EMT-internal),2 MonteCarloMultinomialTest(EMT-internal),2 MonteCarloMultinomialTestChisquare(EMT-internal),2multinomial.test,3,6plotMultinom,67。
A new goodness offit test:the reversed Berk-Jones statisticLeah Jager1and Jon A.Wellner2University of WashingtonJanuary23,2004;revised July22and29,2005AbstractOwen inverted a goodness offit statistic due to Berk and Jones to obtain confidence bands for a distribution function using No´e’s recursion.As argued by Owen,the resulting bands are narrower in the tails and wider in the center than the classical Kolmogorov-Smirnov bands and have certain advantages related to the optimality theory connected with the test statistic proposed by Berk and Jones.In this article we introduce a closely related statistic,the“reversed Berk-Jones statistic”which differs from the Berk and Jones statistic essentially because of the asymmetry of Kullback-Leibler information in its two arguments.We parallel the development of Owen for the new statistic,giving a method for constructing the confidence bands using the recursion formulas of No´e to compute rectangle probabilities for order statistics.Along the way we uncover some difficulties in Owen’s calculations and give appropriate corrections.We also compare the exclusion probabilites(corresponding to the power of the tests)of our new bands with the (corrected version of)Owen’s bands for a simple Lehmann type alternative considered by Owen and show that our bands are preferable over a certain range of alternatives.1IntroductionConsider the classical goodness-of-fit testing problem:based on X1,...,X n i.i.d.F,testH0:F(x)=F0(x)for all x∈I R(1) versusH1:F(x)=F0(x)for some x∈I R(2) where F0is afixed continuous distribution function.Berk and Jones(1979)introduced the test statistic R n,which is defined asR n=sup−∞<x<∞K(F n(x),F0(x)),(3)whereK(x,y)=x log x1−y,(4)and F n is the empirical distribution function of the X i’s,given byF n(x)=12Exact quantiles of the null distribution of˜R n forfinite n2.1Exact null distribution of˜R2Proposition1.Under the null hypothesis,P(˜R2≤x)=r2x,0≤x≤log2(7) where0≤r x≤1is the unique solution of(1−r x)log(1−r x)+(1+r x)log(1+r x)=2x.(8) Proof.Without loss of generality we can take F0to be the uniform distribution on[0,1],F0(x)=x, 0≤x≤1.Note that˜R2=supX(1)≤x<X(2)K(x,F2(x))=max{K(X(1),12)}=max{K(X1,12)}where X1,X2∼Uniform[0,1]are independent.Thus we calculateP(K(U,12solves K(u x,12solves K(l x,12−t,12+t,12,it is clear that u x−12−l x,or u x=1−l x.Hence it follows that(9)equals P(l x≤U≤1−l x)=P(12+v x)=2v x(10)where v x=12]satisfies K(12)=x.But this means that r x=2v x satisfies(8).The conclusion follows sinceP(˜R2≤x)=P(max{K(X1,12)}≤x)=P(K(U,12((1−√1−α)+(1+√1−α)).(12)The0.95quantile is then˜λ0.952=0.625251.The0.99quantile is˜λ0.992=0.675634.2.2Quantiles of the null distribution of˜R n for n>2Owen(1995)computed exact quantiles of the Berk-Jones statistic under the null distribution for finite n using a recursion of No´e(1972).Using an analagous method,we compute exact quantiles of the reversed statistic using this recursion.We want to calculate˜λ1−αn such that P(˜R n≤˜λ1−αn)=1−α.With this˜λ1−αn we can form1−αconfidence bands for F byfinding˜L n(x)and˜H n(x)(depending on the data)such that P(˜R n≤˜λ1−αn)=P(˜L n(x)≤F(x)≤˜H n(x),x∈R).We can rewrite this probability in terms of the order statistics,and then use the recursions due to No´e(1972)to compute it.Our procedure is as follows.We want tofind˜λ1−αn for a given confidence interval correspondingto1−α.Given this˜λ1−αn ,we calculate a confidence band of the form{˜a i,i=1,···,n}and{˜b i,i=1,2,···,n}such that P(˜R n≤˜λ1−αn)=P(˜a i<X(i)≤˜b i,i=1,2,···,n).To see how to calculate{˜a i}and{˜b i},we look at the reversed statistic,˜R n,itself.Similarly to the n=2case above,we can separate the event[˜R n≤˜λn]into parts associated with each order statistic.Now˜Rn=supX(1)≤x<X(n)K(x,F n(x))=K(X(1),1n),K(X(i),in).So the event[˜R n≤˜λn]is equivalent to the intersection of the eventsK(X(1),1n ),K(X(i),in)≤˜λn.(15)Here we have managed to divide the event into smaller events relating to each order statistic separately.In order to compute thefinite sample quantiles,we are looking for{˜a i}n i=1and{˜b i}n i=1such that P(˜R n≤˜λn)=P(˜a i<X(i)≤˜b i,1≤i≤n).(Note that we have deliberately chosen somewhat different notation from Owen(1995).)Splitting the event[˜R n≤˜λn]into events(13),(14),and (15),we can define{˜a i}and{˜b i}in terms of these smaller events.From(13),K(X(1),1n)≤˜λn},(16)˜a1=min{x|K(x,1n)≤˜λn},˜a n=min{x|K(x,n−1Finally,the event(14)yields that for2≤i≤n−1,˜bi=max{x|max{K(x,i−1n)}≤˜λn}=max{x|K(x,i−1n)≤˜λn},(18)˜a i=min{x|max{K(x,i−1n)}≤˜λn}=min{x|K(x,i−1n)≤˜λn}.(19)The above equations for2≤i≤n−1are not as easy to deal with as those for the cases wherei=1and i=n.However,by noticing the relationship between K(x,i−1n ),we cansimplify further.To do this we use the following claim.Claim1.Let˜λn>0.Then for anyfixed y1and y2such that0<y1<y2<1,(i)max{x|K(x,y1)≤˜λn,K(x,y2)≤˜λn}=max{x|K(x,y1)≤˜λn},(ii)min{x|K(x,y1)≤˜λn,K(x,y2)≤˜λn}=min{x|K(x,y2)≤˜λn}, provided{x|K(x,y1)≤˜λn,K(x,y2)≤˜λn}is not empty.Proof.(i)First,note that∂y−log1−x∂xK(x,y1)>∂n)≤˜λn},(20)˜a i=min{x|K(x,iWe can further simplify the calculation by noticing that˜a i=1−˜b n−i+1for1≤i≤n.This is shown in the following two claims.Claim2.Letλ>0.Then for anyfixed y,max{x|K(x,y)≤˜λ}=1−min{x|K(x,1−y)≤˜λ}(22) Proof.Fix y.Now∂y−log1−x)≤˜λn}ni=1−max{x|K(x,1−)≤˜λn}n=1−˜b n−i+1.The cases i=1and i=n are trivial.2 Now that we have defined{˜b i}for all i,and thus defined{˜a i},we can calculate P(˜R n≤˜λn)= P(˜a i<X(i)≤˜b i,1≤i≤n)by a recursion due to No´e(1972).The computing process involved in finding the values of{˜a i},{˜b i},and˜λn follows the method outlined in Owen(1995),using the Van Wijngaarden-Decker-Brent method tofirstfind the{˜a i}and{˜b i}corresponding to a particular˜λnand then reapplying the same Van Wijngaarden-Decker-Brent method again to solve for the˜λ1−αn associated with the1−αquantile.There is,however,one slight complication in these calculations compared to the method outlined in Owen(1995).When calculating confidence bands by inverting the Berk-Jones statistic,we lookat K(x,y)as a function of y for afixed x.For each x∈(0,1),K(x,y)is a continuous function of y with a minimum of0at y=x that tends to∞as y→0or y→1.Therefore for anyλ>0there exists a y∗such that K(x,y∗)=˜λ.For the reversed statistic,however,we look at K(x,y)as a function of x for afixed y.Again, K(x,y)is a continuous function of x with a minimum of0at x=y.But K(0,y)=log1<∞.So we are not guaranteed that for each˜λ>0there exists an x∗such ythat K(x∗,y)=˜λ.Thus care must be taken when looking at˜b i as defined in(20).If there is no x∗satisfying K(x∗,i−1Proof.Note thatR n =sup 0≤x ≤1K (F n (x ),x )=max 1≤i ≤n{K (i −1n,X (i ))}.Thus for n =1we have (interpreting 0log 0=0)R 1=log1X 1.(25)It follows thatP (R 1≤x )=P (log1X 1≤x )=P (e −x≤X 1≤1−e −x )=(1−2e −x )1[log 2,∞)(x ).2Knowing the exact distribution of R 1allows us to calculate the exact quantiles for n =1.We do this by solvingP (R 1≤λ1−α1)=1−α(26)for λ1−α1given a value of 1−α.This implies that the 1−αquantile λ1−α1of R 1is given by λ1−α1=−logαn,X (i )),K (i1−X (1),K (1n,X (i )),K (in,X (n )),log11−X (1),K (1n ,X (i )),K (in,X (n )),log1Again we are looking for numbers{a i}n i=1and{b i}n i=1(which depend also on n andλn, dependence suppressed in the notation)such thatP(R n≤λn)=P(a i<X(i)≤b i,1≤i≤n).Splitting the event[R n≤λn]into events(27),(28),and(29),we can define{a i}and{b i}in terms of these smaller events,as we did in the case of the reversed statistic.From(27),we see thatb1=max{x|max{log 1n,x)}≤λn}=max{x|log 1n,x)≤λn},a1=min{x|max{log 1n,x)}≤λn}=min{x|log 1n,x)≤λn}.Similarly,because of(29),we haveb n=max{x|max{K(n−1x}≤λn}=max{x|K(n−1x≤λn},a n=min{x|max{K(n−1x}≤λn}=min{x|K(n−1x≤λn}.Finally,event(28)gives us that for2≤i≤n−1,b i=max{x|max{K(i−1n,x)}≤λn}=max{x|K(i−1n,x)≤λn}(30)a i=min{x|max{K(i−1n,x)}≤λn}=min{x|K(i−1n,x)≤λn}.(31)Again,we can simplify these expressions for a i and b i by noticing a few things.We begin with the following claim.Claim4.Letλn>0.Then for anyfixed x1and x2such that0<x1<x2<1,(i)max{y|K(x1,y)≤λn,K(x2,y)≤λn}=max{y|K(x1,y)≤λn},(ii)min{y|K(x1,y)≤λn,K(x2,y)≤λn}=min{y|K(x2,y)≤λn}, provided{y|K(x1,y)≤λn,K(x2,y)≤λn}is not empty.Proof.(i)First,note that∂y(1−y).So K decreases in y on the interval[0,x),has a minimum of0at y=x,and increases in y on the interval(x,1].This means that max{y|K(x,y)≤λn}will occur on the interval(x,1].Nowfix x1and x2such that x1<x2.Then K(x1,y)and K(x2,y)will have a point of intersection at c in the interval(x1,x2).That is,K(x1,c)=K(x2,c).Now K(x1,y)is increasing in y on the interval(c,x2],while K(x2,y)is decreasing in y on this same interval.So K(x2,y)<K(x1,y)on(c,x2].But∂∂y K(x2,y)for all y.So K(x2,y)<K(x1,y)for all y in(c,1].There are three cases to consider.First,supposeλn>K(x1,c),where again,c is the point of intersection.Then max{y|K(x1,y)≤λn,K(x2,y)≤λn}>c.Since we have shown that K(x2,y)< K(x1,y)for all y>c,the maximum y value where both K(x1,y)≤λn and K(x2,y)≤λn is the same as the maximum y for which K(x1,y)≤λn.So max{y|K(x1,y)≤λn,K(x2,y)≤λn}= max{y|K(x1,y)≤λn}.Now supposeλn=K(x1,c).Then max{y|K(x1,y)≤λn,K(x2,y)≤λn}=c= max{y|K(x1,y)≤λn}.Finally,supposeλn<K(x1,y).Then there is no y in the interval[0,1]that satisfies max{y|K(x1,y)≤λn,K(x2,y)≤λn},since K(x1,y)>λn for y≥c and K(x2,y)>λn for y≤c.(ii)The result for the minimum is proved in a similar way.2 This claim allows us to simplify(30)and(31)to be(for2≤i≤n−1)b i=max{x|K(i−1n,x)≤λn}.(33) We can also simplify the cases where i=1and i=n.These cases can be written asb1=max{x|log1n,x)≤λn},(35)b n=max{x|K(n−1x≤λn}=e−λn.(37) The rationale for this is as follows.First the i=1case.Notice that log11−yis increasing on (0,c)and K(x,y)is decreasing on this interval,log1∂y log11−y>1y)=∂1−y>K(x,y)onthe interval(c,1).This gives the result for b1.The case for i=n is similar,except that log11−y case.Finally,as in the case of the reversed statistic described above,we see that we can once again define the{a i}in terms of the{b i}as a i=1−b n−i+1for1≤i≤n.The following two claims (analogous to claims2and3in the case of the reversed statistic)show this.Claim5.Letλ>0.Then for anyfixed x,max{y|K(x,y)≤λ}=1−min{y|K(1−x,y)≤λ}(38)Proof.Fix x.Now∂y(1−y).So K decreases in y on the interval[0,x),has a minimum of0at y=x,and increases in y on the interval(x,1].This means that max{y|K(x,y)≤λ}will occur on the interval(x,1],while min{y|K(x,y)≤λ}will occur on the interval[0,x).Also,notice that for all x and y,K(x,y)=K(1−x,1−y).Now,since K(x,y)→∞as x→1for afixed y,there exists a y∗in(x,1]such that K(x,y∗)=λ. So y∗=max{y|K(x,y)≤λ}.But K(1−x,1−y∗)=λas well.Now1−y∗is in the interval [0,1−x).So1−y∗=min{y|K(1−x,y)≤λ}.Thus the result is proved.2 Claim6.For1≤i≤n,a i=1−b n−i+1.(39) Proof.From(32)and(33)we have that for2≤i≤n−1a i=min{x|K(in,x)≤λn}by Claim5=1−max{x|K(n−iP(L i−1<X(i)≤H i,i=1,2,···,n).As defined by Owen,in the two displays below his formula (7),page517,{H i}and{L i}becomeH i=max{x|K(in ,x)≤λn},1≤i≤n−1,L0=0,and then Owen(1995)claims in his formula(9)page518that these are linked to the event {R n≤λn}by{R n≤λn}={L i−1≤X(i)≤H i:i=1,...,n}.(42) But in fact,(42)is false.Note that the event on the right side of(42)implies thatR n≥K((n−1)/n,H n−ǫ)=K((n−1)/n,1−ǫ)→∞asǫ↓0.Thus{R n≤λn}⊂{L i−1≤X(i)≤H i:i=1,...,n}(43) with strict inclusion since the event on the right side allows R n=∞.Moreover,note that R n= R n(X1,...,X n)>λ.95n also at the points X(i)=H i with i<n since K((i−1)/n,H i)>λ.95n. Our definition of{b i}isb1=max{x|log1n,x)≤λn},2≤i≤n.Note that Owen’s H i’s involve the maximum x such that K(in ,x)≤λn.Thus it follows that b i=H i−1for i=2,...,n−1,and similarly a i=1−b n−i+1=1−H n−i=L i,i=2,...,n−1by virtue of Owen’s relation L i=1−H n−i.Thus we claim the correct event identity is:{R n≤λn}={a i<X(i)≤b i,i=1,...,n}(44) where a i=L i,i=1,...,n−1,a n=e−λn,b i=H i−1,i=2,...,n,b1=1−e−λn The following table illustrates the situation numerically for n=4.Table1:Numerical illustration of order statistic bounds,n=4J-W bounds J-W boundsa1=.002737a1=.001340L1=.002737L1=.001340a3=.147088a3=.114653L3=.147088L3=.114653H1=.852912H1=.885347b2=.852912b2=.885347H3=.997263H3=.998660b4=.997263b4=.998660Actual coverage=.901771Actual coverage=.95 wrongλcorrectλcorrect bounds correct bounds Thefirst column of table1gives the constants L i and H i involved in the right side of Owen’s claimed event identity(42)corresponding to hisλ.954=.9149....The“actual coverage”in this column is the probability of the event on the right side of(42)and(43).[Note thatthis probability,.99841...,is not.95.It seems that in his computer program Owen used{a1,...,a n}={L1,...,L n−1,e−λn}in place of L0,...,L n−1.When we make this replacementwefind P(M4)≡P(∩4i=1[a i≤X(i)≤H i])=.95when a i and H i are determined by Owen’sλ.954.But this latter event M4also satisfies[R4≤λ.954]⊂M4.]The second column of table1gives the constants{a i}and{b i}corresponding to Owen’sλ.954=.9149....The resulting probability of thetwo equal events in(44)is0.9017...<.95.(This makes sense since the four dimensional rectangle involved on the right side of(44)is strictly contained in the rectangle on the right side of(42),even with the L i’s replaced by a i’s as in Owen’s program.)The third column of table1gives the constants L i and H i corresponding to ourλ.954=1.092....This is the correctλ.954,but Owen’s bounds L i and H i are still wrong,so equality in(42)fails and the resulting probability of the eventon right side of(43)is.9995...(or.9747...if we use the a i’s in place of L0,...,L4as the lower boundsas in Owen’s program).Finally,column4of table1gives our{a i}and{b i}corresponding to ourλ.954,and the probability of the event on the left side of(43)and both terms in(44)is.95.Table2compares theλ0.95n values calculated using Owen’s definition of the{H i}’s and thosecalculated using our{b i}’s with exact results for n=2,and simulation results for3≤n≤20 and selected larger values of n.The Monte Carlo simulations were carried out by simulating the Berk-Jones statistic100,000times and taking the0.95quantile(or95000th order statistic)of the simulated values.In each case,thefinite sample quantile calculated according to the{b i}found by our method (which is similar to the method used for the reversed statistic)agrees more closely with the simulated result.Finally,we determine the confidence bandsL n(x)=ni=0l i1(X(i),X(i+1)](x),andH n(x)=ni=0h i1[X(i),X(i+1))(x),where X(0)≡−∞and X(n+1)=∞by convention.For x∈(X(i),X(i+1))we have F n(x)=i/n and it is clear that the event[R n≤λ1−αn]restricts F(x)only by K(i/n,F(x))≤λ1−αn.Henceh i=max{p|K(i/n,p)≤λ1−αn},whilel i=min{p|K(i/n,p)≤λ1−αn}.From(32)and(36)it follows that h i=b i+1,i∈{0,...,n−1},and from(35)and(33)we have l i=a i,i∈{1,...,n}.Furthermore h n=1and l0=0(trivially).Table2:Comparison of0.95quantiles of the Berk-Jones statistic with simulation2 1.67031.90032 1.67117.90058 2.024950 2.027693 1.176631.90122 1.17665.90122 1.414108 1.4136240.914983.901950.915054.90198 1.092493 1.0890750.751753.901840.751894.902630.8927880.89133760.639718.903850.639889.903970.7562510.75572570.557816.903500.557992.903590.6567880.65978580.495200.905950.495369.906030.5809900.57874890.445698.907670.445852.907760.5212420.519253100.405531.906600.405670.906500.4728950.473739 110.372252.906460.372376.906610.4329430.433429 120.344209.905940.344319.906050.3993580.402910 130.320240.908650.320337.908760.3707180.370418 140.299506.909030.299592.909080.3459950.344839 150.281384.910730.281461.910410.3244320.322943 160.265404.909260.265473.909350.3054560.306919 170.251203.911450.251265.911560.2886220.287871 180.238495.911720.238551.911800.2735850.272886 190.227054.912120.227104.912190.2600690.258733 200.216696.911420.216742.911340.2478530.249022 500.093344.919850.0933644.919880.1042390.103634 1000.048899.921860.0489062.923330.0537660.053617 5000.010631.930430.0106328.930290.0113810.011379 10000.005466.932510.0054659.931450.005804.00580896As in Owen(1995)and Owen(2001),we give approximation formulas for the0.95and0.99 quantiles of the Berk-Jones statistic which are polynomial in log n.These formulas compare to (10)-(13)in Owen(1995)and to Table7.1,page159in Owen(2001).Wefind that Owen’s exact and approximate critical values for bands with claimed confidence coefficient.95have true coverage ranging from about.90to.93for sample sizes between3and1000;see Table2for estimated coverage probabilities(with105monte-carlo samples).λ0.95 n .=1n(3.7752+0.5062log n−0.0417(log n)2+0.0016(log n)3),100<n≤1000.(46)λ0.99n.=1n(5.6392+0.4018log n−0.0183(log n)2),100<n≤1000.(48)4Power considerations4.1Power heuristicsHere we more specifically address issues of power.We are able to get some qualitative ideas of the behavior of these test statistics against different alternatives by considering the functions K(F0(x),F(x))and K(F(x),F0(x))pointwise in x,rather than taking the supremum over all x.Consider the distribution functionsF1(x)=1x(49)andF2(x)=e−(1x0.00.20.40.60.8 1.00.00.20.40.60.81.Figure 1:Extreme distribution functions F 1(solid line)and F 2(dashed line).than the null,we are actually more interested in the power behavior for alternatives which are slightly different from the null distribution.For example,alternatives which are more moderately stochastically larger or smaller than F 0.Natural alternatives to consider are those of the form F c 0,for different values of c ∈(0,∞).For values of c >1,this distribution is stochastically larger than F 0.For values of c <1,this distribution is stochastically smaller than F 0.Based on the behavior of the functions g 1,g 2,˜g 1,and ˜g 2,we would guess that in this case as well,the dual statistic would be more powerful against stochastically larger alternatives (c >1),while the Berk-Jones statistic would remain more powerful for stochastically smaller alternatives (c <1).4.2Power calculationsTo test our conjectures about power,we use the same algorithm by No ´e (1972)to calculate the probability that F 1,F 2,and F c are contained in the 95%confidence band for F 0.Figure 3plots these probabilities for F c against c for different sample sizes.The curves for sample size n =20can be compared to Figure 5in Owen (1995).The line representing the Berk-Jones statistic is the same as that which Owen calls the curve for the nonparametric likelihood bands.We see that the reverse Berk-Jones statistic has greater power than both the Berk-Jones statistic and the Kolmogorov-Smirnov statistic for values of c >1.5ExamplesFigure 4shows the empirical distribution function of the velocities of 82galaxies from the Corona Borealis region along with 95%confidence intervals generated by inverting both the Berk-Jonesx0.00.20.40.60.8 1.00.00.20.40.60.81.0(a)x0.00.20.40.60.8 1.00.00.20.40.60.81.0(b)Figure 2:(a)The functions g 1(solid line)and ˜g 1(dashed line).(b)The functions g 2(solid line)and ˜g 2(dashed line).0.00010.00100.01000.10001.0000Figure 3:The the 95%confidence bands for F 0(vertical distribution F 0.statistic and the reversed statistic.This data appears in Table 1of Roeder (1990).This figure can be compared to Figures 1and 2in Owen (1995).Comparison shows that the confidence band based on the reversed Berk-Jones statistic are narrower at the tails than the one based on the Kolmogorov-Smirnov statistic.Also,there are slight differences between the confidence band based on the reversed statistic compared to the Berk-Jones statistic.In the region of the lower tail,the band based on the reversed statistic is shifted slightly downward,while in the region of the upper tail,this band is shifted slightly upward.This behavior is more noticable when looking at equally spaced data points.Figure 5shows these same 95%confidence bands for n =20equispaced observations.Velocity (km/sec)50001000015000200002500030000350000.00.20.40.60.81.0Figure 4:The empirical CDF of the velocities of 82galaxies in the Corona Borealis Region (dark solid line)and 95%confidence bands obtained by inverting the Berk-Jones statistic (dashed line)and the reversed Berk-Jones statistic (solid line)Equispaced Data51015200.00.20.40.60.81.0Figure 5:The empirical CDF of 20equally spaced data points (dark solid line)and 95%confidence bands obtained by inverting the Berk-Jones statistic (dashed line)and the reversed Berk-Jones statistic (solid line)Finally,Figure 6gives a comparison of Owen’s bands based on the Berk-Jones statistic to our bands based on the same statistic;as argued above,Owen’s bands do not have the correct coverage probability.Equispaced Data51015200.00.20.40.60.81.0Figure 6:Comparison of Owen’s bands based on the Berk-Jones statistic (dashed line)to our bands based on the Berk-Jones statistic (solid line)for 20equally spaced data pointsThe C and R programs used to carry out the computations presented here are available (in several forms)at/jaw/RESEARCH/SOFTWARE/software.list.html .Acknowledgements:We owe thanks to Art Owen for sharing his C programs used to carry out the computations for his 1995paper.Those programs were used as a starting point for the programs used here.We also owe thanks to Art for several helpful discussions.Mame Astou Diouf pointed out several typographical errors in the first version.ReferencesBerk,R.H.and Jones,D.H.(1979).Goodness-of-fit test statistics that dominate the Kolmogorov statistics.Zeitschrift f¨u r Wahrscheinlichkeitstheorie und Verwandte Gebiete47,47-59.No´e,M.(1972).The calculation of distributions of two-sided Kolmogorov-Smirnov type statistics.Annals of Mathematical Statistics43,58-64.Owen,A.B.(1995).Nonparametric likelihood confidence bands for a distribution function.Journal of the American Statistical Association90,516-521.Owen,A.B.(2001).Empirical Likelihood.Chapman&Hall/CRC,Boca Raton.Roeder,K.(1990).Density estimation with confidence sets exemplified by superclusters and voids in the galaxies.Journal of the American Statistical Association85,617-624. Wellner,J.A.and Koltchinskii,V.(2003).A note on the asymptotic distribution of Berk-Jones type statistics under the null hypothesis.High Dimensional Probability III,321-332.Birkh¨a user,Basel(2003).University of WashingtonStatisticsBox354322Seattle,Washington98195-4322e-mail:leah@University of WashingtonStatisticsBox354322Seattle,Washington98195-4322e-mail:jaw@21。
11-2 Goodness of Fit TestIn This section we consider sample data consisting of observed frequency counts arranged in a single row or column (called a one-way frequency table). We will use a hypothesis test for the claim that the observed frequency counts agree with some claimed distribution, so that there is a good fit of the observed data with the claimed distribution.A goodness-of-fit test is used to test the hypothesis that an observed frequency distribution fits (or conforms to) some claimed distribution.H0: The random variable follows a particular distribution.H1: The random variable does not follow the distribution specified in H0.Ex 1) Consider the observed frequencies and relative frequencies of browser preference form a survey of 200 Internet users.The following model shows how the market shares are distributed in the null hypothesis:H0: P Ms IE= 0.785 , P firefox=0.15, P Safari/other= 0.065H1: The random variable does not follow the distribution specified in H0.How a Goodness- of -Fit Test WorksThe goodness -of -fit test is based on a comparison of the observed frequencies (actual data from the field) with the expected frequencies when H0 is true. That is, we compare what we actually see with what would expect to see if H0 were true. If the difference between the observed and expected frequencies is large, we reject H0.As usual, it comes down to how large a difference is large. The hypothesis we conduct to answer this question relies on χ2 distribution.Performing the χ2 Goodness of Fit TestThe following conditions must be met:∙The data have been randomly selected.∙The sample data consist of frequency counts for each of thedifferent categories.∙None of the expected frequencies is less than 1.∙For each category, the expected frequency is at least 5.Finding Expected FrequenciesThe expected frequency for a category is the frequency that would occur if the data actually have the distribution that is being claimed. For the i th category, the expected frequency is E i = n . p i, where n represent the number of trials and p i represents the population proportion for the i th category.If we assume that all expected frequencies are equal, then each expectedfrequency is E = n/k, where n is the total number of observations and k is the number of categories.The χ2 goodness of fit test may be performed using (a) the critical value, and (b) the p-value method.(a)χ2goodness of fit test. (Critical value method)Step 1: State the hypotheses and check the conditions.The null hypothesis is states that the qualitative random variable follows a particular distribution. The alternative hypothesis states that the random variable does not follow that distribution.Step 2: Find the χ2 critical value, χ2 critical, from table A-4 by using k -1 degrees of freedom, where k is the number of categories.Note, Goodness-of-fit hypothesis are always right tailed.And state the rejection rule.Reject if χ2data > χ2 critical.Step 3: Find the test statistic χ2data.χ2data=O i−E i2E iWhere O i = observed frequency, and E i = expected frequency.Step 4: State the conclusion and the interpretation.Ex 2) Perform the hypothesis test shown in example 1, use 0.05 as a significance level.H0: P Ms IE= 0.785 , P firefox=0.15, P Safari/other= 0.065H1: The random variable does not follow the distribution specified in H0.Interpretation: There is evidence that the random variable browser does not follow the distribution in H0. In other words, there is evidence that the market shares for internet browsers have changed.Note carefully what this conclusion says and what it doesn’t say. The χ2goodness of fit test shows that there is evidence that the random variable does not follow the distribution specified in H0. In particular, the conclusion does not state, for example, that Firefox’s proportion is significantly greater.(b)χ2goodness of fit test: (p-value Method)Step 1: State the hypotheses and check the conditions.Step 2: Find the test statistic χ2data.χ2data=O i−E i2E iWhere O i = observed frequency, and E i = expected frequencyStep 3: Find the p-value.p-value = P (χ2 > χ2 data)Step 4: State the conclusion and the interpretation.Ex (3) The following tables show figures on the market share of cablemodem, DSL, and wireless broadband from a 2002 survey and a 2006survey which was based on a random sample of 1000 home broadbandusers. Test whether the population proportions have changed since 2002, using the p-value method, and level of significance is 0.05.Cable modem DSL Wireless/other67% 28% 5%Cable modem DSL Wireless/other410 500 90`。
1、endogenous variables 内生变量2、exogenous variables 外生变量3、Analysis Summary 分析总结4、exogenous latent variables 潜在外生变量5、endogenous latent variables 潜在内生变量6、path diagram 路径图7、residual 残差8、structural model 结构模型9、measurements model 测量模10、2 -goodness-of-fit test 卡方检验11、GFI(adjusted goodness-of-fit index)拟合优度指数12、RMR(root mean square residual) 平方平均残差的平方根13、Ordered-Categorical censored data 有序分类截尾数据14、intercepts 截获,截距15、regression weights 回归权重16、scalar estimates 标量估计17、Minimization history 最小化的历史18、Squared multiple correlations 平方多重相关性19、score 得分20、Maximum Likelihood Estimates 极大似然估计21、scale 规模12.47, .03Estimates (Group number 1 - Default model)Scalar Estimates (Group number 1 - Default model)Maximum Likelihood EstimatesRegression Weights: (Group number 1 - Default model)Standardized Regression Weights: (Group number 1 - Default model)Means: (Group number 1 - Default model)Intercepts: (Group number 1 - Default model)Covariances: (Group number 1 - Default model)Correlations: (Group number 1 - Default model)Variances: (Group number 1 - Default model)Squared Multiple Correlations: (Group number 1 - Default model)Minimization: .000 Miscellaneous: .078Bootstrap: .000Total: .078Number of variables in your model: 4Number of observed variables: 3Number of unobserved variables: 1Number of exogenous variables: 3Number of endogenous variables: 1Number of distinct sample moments: 9 Number of distinct parameters to be estimated: 9Degrees of freedom (9 - 9): 0 Estimates (Group number 1 - Default model)Scalar Estimates (Group number 1 - Default model)Maximum Likelihood EstimatesRegression Weights: (Group number 1 - Default model)Standardized Regression Weights: (Group number 1 - Default model)Means: (Group number 1 - Default model)Intercepts: (Group number 1 - Default model)Covariances: (Group number 1 - Default model)Correlations: (Group number 1 - Default model)Variances: (Group number 1 - Default model)Squared Multiple Correlations: (Group number 1 - Default model)Minimization:.000Miscellaneous:.078Bootstrap:.000Total:.078Minimization: .000Miscellaneous: .078Bootstrap: .000Total: .078Amos 提供下列方法以估计结构方程模型:极大似然法>非加权最小二乘法>广义最小二乘法Browne’s asymptotically distribution-free criterion Browne’s渐进自由分布标准Scale-free least squares 自由尺度最小二乘法。