predict-methods(robustfa)
predict-methods()所属R语言包:robustfa
Calculates prediction
计算预测
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Calculates prediction using the results in object. The newdata argument is an optional data frame or matrix in which to look for variables with which to predict. If newdata is omitted, the scores are used.
计算预测结果的对象。 newdata参数是可选的数据框或矩阵中寻找变量,用以预测。如果省略newdata,分数使用。
用法----------Usage----------
predict(object, ...)
参数----------Arguments----------
参数:object
an object of class "Fa" or of a class derived from "Fa"
对象的类"Fa"或一类来自"Fa"
参数:...
additional arguments, e.g., newdata: an optional data frame or matrix in which to look for variables with which to predict. If newdata is not missing, newdata should be scaled before "predict".
额外的参数,例如,newdata:一个可选的数据框或矩阵中寻找变量,用以预测。如果newdata不缺,newdata,应调整前"predict"。
方法----------Methods----------
generic functions - see show, print, summary, predict, plot, getCenter, getEigenvalues, getFa, getLoadings, getQuan, getScores, getSdev
通用的功能 - show,print,summary,predict,plot,getCenter,getEigenvalues,getFa ,getLoadings,getQuan,getScores,getSdev
实例----------Examples----------
data(stock611)
## facovRegOgk is obtained from FaCov.default[#facovRegOgk被从FaCov.default获得]
## facovRegOgk uses the default method = "mle"[#facovRegOgk使用默认的方法=“最大似然估计”]
facovRegOgk=FaCov(x=scale(stock611[,3:12]), factors=3, cov.control = CovControlOgk(),
scoresMethod = "regression"); facovRegOgk
## If missing newdata, the scores are used[#如果没有newdata,分数是]
predict(facovRegOgk)
## newdata must have the same center and scale attributes as[#newdata必须具有相同的中心,并规模属性作为]
## the original data.[#原始数据。]
x=scale(stock611[,3:12])
newdata=stock611[1,3:12] # one row matrix[一列的矩阵]
newdata=scale(newdata, center=attr(x,"scaled:center"), scale=attr(x,"scaled:scale"))
prediction=predict(facovRegOgk, newdata=newdata); prediction
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|