pred.y(SeleMix)
pred.y()所属R语言包:SeleMix
Prediction of y variables
y变量的预测
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Provides predictions of y variables according to a Gaussian contamination model
根据高斯污染模型提供的y变量的预测
用法----------Usage----------
pred.y (y, x=NULL, B, sigma, lambda, w, model="LN", t.outl=0.5)
参数----------Arguments----------
参数:y
matrix or data frame containing the response variables
矩阵或数据框包含响应变量
参数:x
optional matrix or data frame containing the error free covariates
可选的矩阵或数据框包含的错误协变量
参数:B
matrix of regression coefficients
回归系数矩阵
参数:sigma
covariance matrix
协方差矩阵
参数:lambda
variance inflation factor
方差膨胀因子
参数:w
proportion of erroneous data
错误的数据的比例
参数:model
data distribution: LN = lognormal(default), N=normal
数据分布:LN =对数正态分布(默认),N =正常
参数:t.outl
threshold value for posterior probabilities of identifying outliers (default=0.5)
识别异常值的后验概率阈值(默认值= 0.5)
Details
详细信息----------Details----------
This function provides expected values of a set of variables (y1.p,y2.p,... ) according to a mixture of two regression models with Gaussian residuals (see ml.est). If no covariates are available (x variables), a two component Gaussian mixture is used. Expected values (predictions) are computed on the base of a set of parameters of appropriate dimensions (B, sigma, lambda,w) and (possibly) a matrix (or data frame) containing the error-free x variables.
此功能提供的预期值的一组变量(y1.p,y2.p,...)根据两个与高斯残差的回归模型中的混合物(见ml.est)。如果没有可用的协变量是(x变量),双组分混合高斯被使用。预期值(预测)的计算的基础上,适当的尺寸的参数的一组(B, sigma, lambda,w)和(可能的)的矩阵(或数据框)含有无误差x变量。
Missing values in the x variables are not allowed. However, robust predictions of y variables are also provided when these variables are not observed. A vector of missing pattern (pattern) indicates which item is observed and which is missing.
x变量的遗漏值是不允许的。然而,鲁棒预测y变量还提供了这些变量时没有观察到。失踪模式的矢量(pattern)表示项目的观察和丢失。
For each unit in the data set the posterior probability of being erroneous (tau) is computed and a flag (outlier) is provided taking value 0 or 1 depending on whether tau is greater than the user specified threshold (t.outl).
对于每个单元中的数据的后验概率的错误设置(tau)被计算和一个标志(outlier)设置值0或1,这取决于是否tau是大于用户指定的阈值(t.outl)。
值----------Value----------
pred.y returns a data frame containing the following columns:<br><br> <table summary="R valueblock"> <tr valign="top"><td>y1.p,y2.p,...</td> <td> predicted values for y variables </td></tr> <tr valign="top"><td>tau </td> <td> posterior probabilities of being contaminated</td></tr> <tr valign="top"><td>outlier </td> <td> 1 if the observation is classified as an outlier, 0 otherwise </td></tr> <tr valign="top"><td>pattern</td> <td> non-response patterns for y variables: 0 = missing, 1 = present value</td></tr>
pred.y返回一个数据框包含以下几列:<BR>参考<table summary="R valueblock"> <tr valign="top"> <TD> y1.p,y2.p,...</ TD> < TD> y变量的预测值</ TD> </ TR> <tr valign="top"> <TD>tau </ TD> <TD>被污染后验概率</ TD> </ TR > <tr valign="top"> <TD> outlier </ TD> <TD> 1如果观测,否则被归类为离群值,0 </ TD> </ TR> <TR VALIGN =“顶部“> <TD> pattern </ TD> <TD> y变量的非响应模式:0 =人失踪,1 =现值</ TD> </ TR>
</table>
</ TABLE>
(作者)----------Author(s)----------
M. Teresa Buglielli <bugliell@istat.it>, Ugo Guarnera <guarnera@istat.it>
参考文献----------References----------
Buglielli, M.T., Di Zio, M., Guarnera, U. (2010) "Use of Contamination Models for Selective Editing", European Conference on Quality in Survey Statistics Q2010, Helsinki, 4-6 May 2010
实例----------Examples----------
# Parameter estimation with one contaminated variable and one covariate[参数估计一个污染的变量和一个协]
data(ex1.data)
# Parameters estimated applying ml.est to \code{ex1.data} [参数估计申请的\代码ml.est {ex1.data}]
B1 <- as.matrix(c(-0.152, 1.215))
sigma1 <- as.matrix(1.25)
lambda1 <- 15.5
w1 <- 0.0479
# Variable prediction[可变预测]
ypred <- pred.y (y=ex1.data[,"Y1"], x=ex1.data[,"X1"], B=B1,
sigma=sigma1, lambda=lambda1, w=w1, model="LN", t.outl=0.5)
# Plot ypred vs Y1[图ypred与Y1]
sel.pairs(cbind(ypred[,1,drop=FALSE],ex1.data[,"Y1",drop=FALSE]),
outl=ypred[,"outlier"])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|