找回密码
 注册
查看: 459|回复: 0

R语言 wle包 wle.cp()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 22:39:15 | 显示全部楼层 |阅读模式
wle.cp(wle)
wle.cp()所属R语言包:wle

                                        Weighted Mallows Cp
                                         加权锦葵CP

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

The Weighted Mallows Cp is evaluated for each submodel.
为每个子模型计算的加权锦葵CP。


用法----------Usage----------


wle.cp(formula, data=list(), model=TRUE, x=FALSE,
       y=FALSE, boot=30, group, var.full=0, num.sol=1,
       raf="HD", smooth=0.031, tol=10^(-6),
       equal=10^(-3), max.iter=500, min.weight=0.5,
       method="full", alpha=2, contrasts=NULL, verbose=FALSE)



参数----------Arguments----------

参数:formula
a symbolic description of the model to be fit. The details of model specification are given below.
一个象征性的模型来描述是合适的。模型规范的细节在下面给出。


参数:data
an optional data frame containing the variables in the model.  By default the variables are taken from the environment which wle.cp is called from.
一个可选的数据框包含在模型中的变量。默认情况下,变量是从wle.cp被称为从环境。


参数:model, x, y
logicals.  If TRUE the corresponding components of the fit (the model frame, the model matrix, the response.)
的逻辑。如果TRUE拟合的相应部件(模型框架,模型矩阵,响应。)


参数:boot
the number of starting points based on boostrap subsamples to use in the search of the roots.
基于自举子样本的起点,使用在搜索的根的数目。


参数:group
the dimension of the bootstap subsamples. The default value is max(round(size/4),var) where size is the number of observations and var is the number of variables.
的维度的bootstap子样本。默认值是max(round(size/4),var)size的一些意见和var是变量的数目。


参数:var.full
the value of variance to be used in the denominator of the WCP, if 0 the variance estimated from the full model is used.
中要使用的值的方差的WCP的分母,若为0则用于从完整的模型估计的方差。


参数:num.sol
maximum number of roots to be searched.
要搜索的最大根数。


参数:raf
type of Residual adjustment function to be use:
类型的残余调节功能,可以使用:

raf="HD": Hellinger Distance RAF,
raf="HD":Hellinger距离RAF,

raf="NED": Negative Exponential Disparity RAF,
raf="NED":负指数差异RAF,

raf="SCHI2": Symmetric Chi-Squared Disparity RAF.
raf="SCHI2":对称卡方差异皇家空军。


参数:smooth
the value of the smoothing parameter.
的平滑化参数的值。


参数:tol
the absolute accuracy to be used to achieve convergence of the algorithm.c
到达到收敛的algorithm.c的使用的绝对精度


参数:equal
the absolute value for which two roots are considered the same. (This parameter must be greater than tol).
绝对的值,两个根被认为是相同的。 (此参数必须大于tol)。


参数:max.iter
maximum number of iterations.
最大迭代次数。


参数:min.weight
see details.
查看详细信息。


参数:method
see details.
查看详细信息。


参数:alpha
penalty value.
惩罚值。


参数:contrasts
an optional list. See the contrasts.arg of model.matrix.default.
可选列表。请参阅contrasts.argmodel.matrix.default。


参数:verbose
if TRUE warnings are printed.
如果是TRUE警告被打印出来。


Details

详细信息----------Details----------

Models for wle.cp are specified symbolically.  A typical model has the form response ~ terms where response is the (numeric) response vector and terms is a series of terms which specifies a linear predictor for response.  A terms specification of the form first+second indicates all the terms in first together with all the terms in second with duplicates removed. A specification of the form first:second indicates the the set of terms obtained by taking the interactions of all terms in first with all terms in second. The specification first*second indicates the cross of first and second.  This is the same as first+second+first:second.
模型wle.cp的符号。典型的模型形式response ~ terms其中response是响应向量(数字)和terms是一系列的条款,指定一个线性预测response。一个术语规范的形式first+second表示first一起在second重复删除的所有条款中的所有条款。一个规范的形式first:second的表示的术语集firstsecond的所有条款的相互作用的所有条款。规格first*second表明first和second交叉的。这是相同first+second+first:second。

min.weight: the weighted likelihood equation could have more than one solution. These roots appear for particular situation depending on contamination level and type. The presence of multiple roots in the full model can create some problem in the set of weights we should use. Actually, the selection of the root is done by the minimum scale error provided. Since this choice is not always the one would choose, we introduce the min.weight parameter in order to choose only between roots that do not down weight everything. This is not still the optimal solution, and perhaps, in the new release, this part will be change.
min.weight:加权似然方程可以有一个以上的解决方案。这些根出现特定情况下,根据污染程度和类型。组中的权重,我们应该用多根完整的模型的存在可以创造出一些问题。事实上,根的选择是通过提供最小刻度误差。由于这种选择并不总是一个选择,我们引进了min.weight参数,以便选择之间不下来的重量一切的根源。这是不是仍然是最佳的解决方案,也许,在新版本中,这部分将有所改变。


值----------Value----------

wle.cp returns an object of class "wle.cp".
wle.cp返回一个对象的class"wle.cp"的。

The function summary is used to obtain and print a summary of the results. The generic accessor functions coefficients and residuals extract coefficients and residuals returned by wle.cp. The object returned by wle.cp are:
函数summary用于获取和打印结果的摘要。一般的访问功能coefficients和residuals的提取系数和残差返回wle.cp。对象返回wle.cp是:

<table summary="R valueblock"> <tr valign="top"><td>wcp</td> <td> Weighted Mallows Cp for each submodels</td></tr> <tr valign="top"><td>coefficients</td> <td> the parameters estimator, one row vector for each root found and each submodel.</td></tr> <tr valign="top"><td>scale</td> <td> an estimation of the error scale, one value for each root found and each submodel.</td></tr> <tr valign="top"><td>residuals</td> <td> the unweighted residuals from the estimated model, one column vector for each root found and each submodel.</td></tr> <tr valign="top"><td>tot.weights</td> <td> the sum of the weights divide by the number of observations, one value for each root found and each submodel.</td></tr> <tr valign="top"><td>weights</td> <td> the weights associated to each observation, one column vector for each root found and each submodel.</td></tr> <tr valign="top"><td>freq</td> <td> the number of starting points converging to the roots.</td></tr> <tr valign="top"><td>call</td> <td> the match.call().</td></tr> <tr valign="top"><td>contrasts</td> <td> </td></tr> <tr valign="top"><td>xlevels</td> <td> </td></tr> <tr valign="top"><td>terms</td> <td> the model frame.</td></tr> <tr valign="top"><td>model</td> <td> if model=TRUE a matrix with first column the dependent variable and the remain column the explanatory variables for the full model.</td></tr> <tr valign="top"><td>x</td> <td> if x=TRUE a matrix with the explanatory variables for the full model.</td></tr> <tr valign="top"><td>y</td> <td> if y=TRUE a vector with the dependent variable.</td></tr> <tr valign="top"><td>info</td> <td> not well working yet, if 0 no error occurred.</td></tr> </table>
<table summary="R valueblock"> <tr valign="top"> <TD> wcp </ TD> <TD>加权锦葵Cp为每个子模型</ TD> </ TR> <TR VALIGN = “顶”> <TD> coefficients </ TD> <TD>的参数估计,每一根发现,每个子模型的一个行向量。</ TD> </ TR> <tr valign="top"> <TD> scale </ TD> <TD>的错误规模的估计,每一根发现,每个子模型的一个值。</ TD> </ TR> <tr valign="top"> <TD >residuals</ TD> <TD>未加权残差估计模型,一个列向量为每一根发现,每个子模型。</ TD> </ TR> <tr valign="top"> <TD >tot.weights</ TD> <TD>的权重总和除以观测值的数量,每一根发现的一个值,每个子模型。</ TD> </ TR> <TR VALIGN =“顶” <TD> weights </ TD> <TD>每个观察相关的权重,每一根发现一个列向量,每个子模型。</ TD> </ TR> <tr valign="top"> <TD> freq </ TD> <TD>收敛的根源出发点的数量。</ TD> </ TR> <tr valign="top"> <TD>call / TD> <TD> match.call()</ TD> </ TR> <tr valign="top"> <TD>contrasts </ TD> <TD> </ TD> </ TR> <tr valign="top"> <TD>xlevels </ TD> <TD> </ TD> </ TR> <tr valign="top"> <TD>terms / TD> <TD>的模型框架。</ TD> </ TR> <tr valign="top"> <TD> model </ TD> <TD>如果model=TRUE矩阵第一列因变量和列的完整模型的解释变量。</ TD> </ TR> <tr valign="top"> <TD>x </ TD> <TD>如果 x=TRUE矩阵的完整模型的解释变量。</ TD> </ TR> <tr valign="top"> <TD> y</ TD> <TD><X >与因变量的向量。</ TD> </ TR> <tr valign="top"> <TD>y=TRUE</ TD> <TD>以及工作尚未,如果0没有发生错误</ TD> </ TR> </ TABLE>


(作者)----------Author(s)----------


Claudio Agostinelli



参考文献----------References----------


Agostinelli, C., (1999). Robust model selection in regression via weighted likelihood methodology,  Working Paper n. 1999.4, Department of Statistics, Universiy of Padova.
Agostinelli, C., (2002). Robust model selection in regression via weighted likelihood methodology,  Statistics \&amp; Probability Letters, 56, 289-300.
Agostinelli, C., (1998). Inferenza statistica robusta basata sulla funzione di verosimiglianza pesata: alcuni sviluppi,  Ph.D Thesis, Department of Statistics, University of Padova.
Agostinelli, C., Markatou, M., (1998). A one-step robust estimator for regression based on the weighted likelihood reweighting scheme,  Statistics \&amp; Probability Letters, Vol. 37, n. 4, 341-350.
Agostinelli, C., (1998). Verosimiglianza pesata nel modello di regressione lineare,   XXXIX Riunione scientifica della Societ\'a Italiana di Statistica, Sorrento 1998.


参见----------See Also----------

wle.smooth an algorithm to choose the smoothing parameter for normal distribution and normal kernel, wle.lm a function for estimating linear models with normal distribution error and normal kernel.
wle.smooth算法选择平滑参数正常分布和正态分布的内核,wle.lm估计线性模型与正常分配错误和正常的内核的功能。


实例----------Examples----------


library(wle)

x.data <- c(runif(60,20,80),runif(5,73,78))
e.data <- rnorm(65,0,0.6)
y.data <- 8*log(x.data+1)+e.data
y.data[61:65] <- y.data[61:65]-4
z.data <- c(rep(0,60),rep(1,5))

plot(x.data,y.data,xlab="X",ylab="Y")

xx.data <- cbind(x.data,x.data^2,x.data^3,log(x.data+1))
colnames(xx.data) <- c("X","X^2","X^3","log(X+1)")

result <- wle.cp(y.data~xx.data,boot=10,group=10,num.sol=2)

summary(result)

plot(result,num.max=15)

result <- wle.cp(y.data~xx.data+z.data,boot=10,group=10,num.sol=2)

summary(result)

plot(result,num.max=15)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-25 03:56 , Processed in 0.021134 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表