R中 summary() 和 anova()的含义

Python017

R中 summary() 和 anova()的含义,第1张

是stats包中的函数,要注意它与Anova的区别。

car包中的函数。用来计算II 和 III型方差

| anova {stats} | R Documentation |

Compute analysis of variance (or deviance) tables for one or more fitted model objects.计算一个或多个拟合模型对象的方差(或偏差)表。偏差又称为表观误差,是指个别测定值与测定的平均值之差,它可以用来衡量测定结果的精密度高低。在统计学中,偏差可以用于两个不同的概念,即有偏采样与有偏估计。一个有偏采样是对总样本集非平等采样,而一个有偏估计则是指高估或低估要估计的量 。

我个人理解是,计算模型的偏差,或者是可解释方差。可解释方差越大,代表该因素对因变量的影响越大。

如果是线性回归,可以用anova()输出F检验的方差分析表,如果变量只有2个水平,则应该跟t检验的p结果一致。

如果是逻辑回归,可以用anova()输出卡方检验的分析表。

anova(object, ...)

object

an object containing the results returned by a model fitting function (e.g., lm or glm ).

...

additional objects of the same type.

This (generic) function returns an object of class anova . These objects represent analysis-of-variance and analysis-of-deviance tables.

此(泛型)函数返回一个 anova 类的对象。这些对象表示方差分析表和偏差分析表。

When given a single argument it produces a table which tests whether the model terms are significant.

当给定单个参数时,它会生成一个表,用于测试模型各个项是否显著。

When given a sequence of objects, anova tests the models against one another in the order specified.

当给定一系列对象时, anova 会按照指定的顺序对模型进行相互测试。

The print method for anova objects prints tables in a ‘pretty’ form.

“anova”对象的print方法以“ pretty”的形式打印表格。

The comparison between two or more models will only be valid if they are fitted to the same dataset. This may be a problem if there are missing values and R 's default of na.action = na.omit is used.

两个或多个模型之间的比较只有在它们符合同一数据集时才有效。如果有缺失值,并且使用了 R 的默认值: na.action=na.omit ,这可能会有问题。

Chambers, J. M. and Hastie, T. J. (1992) Statistical Models in S , Wadsworth &Brooks/Cole.

| summary {base} | R Documentation |

summary is a generic function used to produce result summaries of the results of various model fitting functions. The function invokes particular methods which depend on the class of the first argument.

summary 是一个通用函数,用于生成各种模型拟合函数的结果。该函数调用特定的参数方法,这些方法取决于第一个参数的参数类。

pretty是开音节

pretty

读音:英 [ˈprɪti]   美 [ˈprɪti] 。

释义:漂亮的。

1、以一个元音字母结尾的重读音节。这个元音字母在单词中发它在字母表中的音,即它本身的读、音。

2、在含有一个元音字母的重读音节中,在元音字母后有大于或等于一的辅音字母(r除外)与一个不发音的字母e,也是开音节。这个元音字母发它本身的音。如:name, fine。 可以用辅+元+除r辅+e来记住。

相关词组:

pretty amateur 相当业余。

pretty certain 颇有把握。

pretty fiery 非常辣。

pretty good 相当好。

pretty hopeless 希望渺茫。

pretty hungry 相当饿。

pretty satisfied 相当满意。

pretty secure 很稳固。