extractAIC(stats)
extractAIC()所属R语言包:stats
Extract AIC from a Fitted Model
提取从拟合模型的AIC的
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the (generalized) Akaike An Information Criterion for a fitted parametric model.
计算(广义)赤池信息准则为拟合参数模型。
用法----------Usage----------
extractAIC(fit, scale, k = 2, ...)
参数----------Arguments----------
参数:fit
fitted model, usually the result of a fitter like lm.
拟合模型,通常像lm钳工。
参数:scale
optional numeric specifying the scale parameter of the model, see scale in step. Currently only used in the "lm" method, where scale specifies the estimate of the error variance, and scale = 0 indicates that it is to be estimated by maximum likelihood.
指定可选的数字模型的尺度参数,见scalestep。目前只用在"lm"方法,其中scale指定误差方差的估计,scale = 0表明它是由最大似然估计。
参数:k
numeric specifying the "weight" of the equivalent degrees of freedom (=: edf) part in the AIC formula.
数字指定的“重量”自由的等效度(=:edf)在AIC公式的一部分。
参数:...
further arguments (currently unused in base R).
(目前在基地ŕ闲置)进一步论据。
Details
详情----------Details----------
This is a generic function, with methods in base R for classes "aov", "glm" and "lm" as well as for "negbin" (package MASS) and "coxph" and "survreg" (package survival).
这是一个通用的功能,与在基地ŕ方法类"aov","glm"和"lm"以及"negbin"(包MASS)"coxph"和"survreg"(包survival)。
The criterion used is
使用的标准是
where L is the likelihood and edf the equivalent degrees of freedom (i.e., the number of free parameters for usual parametric models) of fit.
其中L的可能性和edf同等的自由程度(即通常的参数模型参数的数目)fit。
For linear models with unknown scale (i.e., for lm and aov), -2 log L is computed from the deviance and uses a different additive constant to logLik and hence AIC. If RSS denotes the (weighted) residual sum of squares then extractAIC uses for -2 log L the formulae RSS/s - n (corresponding to Mallows' Cp) in the case of known scale s and n log (RSS/n) for unknown scale. AIC only handles unknown scale and uses the formula n*log(RSS/n) + n + n*log 2pi - sum(log w) where w are the weights. Further AIC counts the scale estimation as a parameter in the edf and extractAIC does not.
对于未知规模的线性模型(即lm和aov)-2 log L计算的偏差,并使用不同的添加剂不断logLik,因此<X > AIC如果表示(加权)的平方剩余的总和,然后RSS公式extractAIC(对应锦葵“”-2 log L)RSS/s - n使用的情况下已知规模Cp和s未知的规模。 n log (RSS/n)只处理未知的规模和使用的公式AICn*log(RSS/n) + n + n*log 2pi - sum(log w)的重量。进一步w计数作为一个参数AIC和edf不规模的估计。
For glm fits the family's aic() function is used to compute the AIC: see the note under logLik about the assumptions this makes.
glm适合用于计算AIC的:见说明下aic()有关的假设,这使得家庭的logLik功能。
k = 2 corresponds to the traditional AIC, using k = log(n) provides the BIC (Bayesian IC) instead.
k = 2对应于传统的工商行政管理机关,使用k = log(n)提供BIC(贝叶斯集成电路),而不是。
Note that the methods for this function may differ in their assumptions from those of methods for AIC (usually via a method for logLik). We have already mentioned the case of "lm" models with estimated scale, and there are similar issues in the "glm" and "negbin" methods where the dispersion parameter may or may not be taken as "free". This is immaterial as extractAIC is only used to compare models of the same class (where only differences in AIC values are considered).
请注意,此功能的方法可能会在他们的假设不同的那些AIC方法(一种logLik方法通常是通过)。我们已经提到"lm"模型估计规模的情况下,有色散参数可能会或可能不会被作为自由的"glm"和"negbin"方法类似问题;这是无关紧要的extractAIC仅用于比较同一类的模型(AIC中值被认为是唯一的区别)。
值----------Value----------
A numeric vector of length 2, with first and second elements giving
与第一个和第二个元素给一个长度为2的数字向量,
参数:edf
the "equivalent degrees of freedom" for the fitted model fit.
拟合模型fit“同等程度的自由”。
参数:AIC
the (generalized) Akaike Information Criterion for fit.
(广义)赤池信息准则fit。
注意----------Note----------
This function is used in add1, drop1 and step and the similar functions in package MASS from which it was adopted.
此功能用于在add1,drop1和step“类似的功能在包MASS从中获得通过。
作者(S)----------Author(s)----------
B. D. Ripley
参考文献----------References----------
Modern Applied Statistics with S. New York: Springer (4th ed).
参见----------See Also----------
AIC, deviance, add1, step
AIC,deviance,add1,step
举例----------Examples----------
utils::example(glm)
extractAIC(glm.D93) #>> 5 15.129[>> 5 15.129。]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|