logLik(stats)
logLik()所属R语言包:stats
Extract Log-Likelihood
提取对数似然
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function is generic; method functions can be written to handle specific classes of objects. Classes which have methods for this function include: "glm", "lm", "nls" and "Arima". Packages contain methods for other classes, such as "fitdistr", "negbin" and "polr" in package MASS, "multinom" in package nnet and "gls", "gnls" "lme" and others in package nlme.
此功能是通用的;写方法功能可以处理特定的类的对象。有此功能的方法的类,包括:"glm","lm","nls"和"Arima"。包包含其他类的方法,如"fitdistr","negbin"和"polr"套件MASS,"multinom"包nnet和<X, >,"gls""gnls"和其他包"lme"。
用法----------Usage----------
logLik(object, ...)
## S3 method for class 'lm'
logLik(object, REML = FALSE, ...)
参数----------Arguments----------
参数:object
any object from which a log-likelihood value, or a contribution to a log-likelihood value, can be extracted.
从任何日志的可能性值,或对数似然值的贡献,可以提取的对象。
参数:...
some methods for this generic function require additional arguments.
这个泛型函数的一些方法需要额外的参数。
参数:REML
an optional logical value. If TRUE the restricted log-likelihood is returned, else, if FALSE, the log-likelihood is returned. Defaults to FALSE.
一个可选的逻辑值。如果TRUE限制日志的可能性则返回,否则,如果FALSE,日志返回的可能性。 FALSE默认。
Details
详情----------Details----------
For a "glm" fit the family does not have to specify how to calculate the log-likelihood, so this is based on using the family's aic() function to compute the AIC. For the gaussian, Gamma and inverse.gaussian families it assumed that the dispersion of the GLM is estimated and has been counted as a parameter in the AIC value, and for all other families it is assumed that the dispersion is known. Note that this procedure does not give the maximized likelihood for "glm" fits from the Gamma and inverse gaussian families, as the estimate of dispersion used is not the MLE.
"glm"适合family不指定如何计算对数似然,所以这是根据家庭的aic()函数来计算的AIC使用。对于gaussian,Gamma和inverse.gaussian家庭认为分散的GLM估计已经算作AIC值的参数,它是假设所有其他家庭被称为分散。请注意,此过程不会给予最大化的可能性"glm"适合伽玛和逆高斯家庭,使用分散的估计是没有的MLE。
For "lm" fits it is assumed that the scale has been estimated (by maximum likelihood or REML), and all the constants in the log-likelihood are included.
"lm"符合假定的规模据估计最大的可能性或REML法,所有常数的对数似然。
值----------Value----------
Returns an object of class logLik. This is a number with at least one attribute, "df" (degrees of freedom), giving the number of (estimated) parameters in the model.
类logLik返回一个对象。这是一个至少有一个属性,"df"(自由度),(估计)模型中的参数的数量。
There is a simple print method for "logLik" objects.
有一个简单的print"logLik"对象的方法。
There may be other attributes depending on the method used: see the appropriate documentation. One that is used by several methods is "nobs", the number of observations used in estimation (after the restrictions if REML = TRUE).
可能有其他属性取决于所使用的方法:参见相应的文档。几种方法使用的是"nobs",在估计使用的意见(限制后,如果REML = TRUE)。
作者(S)----------Author(s)----------
Jos |