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

R语言:proj()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 21:39:14 | 显示全部楼层 |阅读模式
proj(stats)
proj()所属R语言包:stats

                                        Projections of Models
                                         模型的预测

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

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

proj returns a matrix or list of matrices giving the projections of the data onto the terms of a linear model.  It is most frequently used for aov models.
proj返回一个矩阵的矩阵提供的数据推算,到线性模型的条款或列表。这是最常用的aov模型。


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


proj(object, ...)  

## S3 method for class 'aov'
proj(object, onedf = FALSE, unweighted.scale = FALSE, ...)  

## S3 method for class 'aovlist'
proj(object, onedf = FALSE, unweighted.scale = FALSE, ...)  

## Default S3 method:[默认方法]
proj(object, onedf = TRUE, ...)  

## S3 method for class 'lm'
proj(object, onedf = FALSE, unweighted.scale = FALSE, ...)  



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

参数:object
An object of class "lm" or a class inheriting from it, or an object with a similar structure including in particular components qr and effects.
一个对象类"lm"或从类继承,或具有类似结构的对象,包括在特定的组件qr和effects。


参数:onedf
A logical flag. If TRUE, a projection is returned for all the columns of the model matrix. If FALSE, the single-column projections are collapsed by terms of the model (as represented in the analysis of variance table).
一个逻辑标志。如果TRUE,投影返回的模型矩阵的所有列。如果FALSE,单柱预测模型(方差分析表代表)倒塌。


参数:unweighted.scale
If the fit producing object used weights, this determines if the projections correspond to weighted or unweighted observations.
如果适合生产object使用权的,该决定,如果预测对应加权或加权观测。


参数:...
Swallow and ignore any other arguments.
燕子和忽略任何其他参数。


Details

详情----------Details----------

A projection is given for each stratum of the object, so for aov models with an Error term the result is a list of projections.
投影aov模型为对象的每个阶层,所以Error长期结果的预测名单。


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

A projection matrix or (for multi-stratum objects) a list of projection matrices.
一个投影矩阵(多阶层对象)的投影矩阵列表。

Each projection is a matrix with a row for each observations and either a column for each term (onedf = FALSE) or for each coefficient (onedf = TRUE). Projection matrices from the default method have orthogonal columns representing the projection of the response onto the column space of the Q matrix from the QR decomposition.  The fitted values are the sum of the projections, and the sum of squares for each column is the reduction in sum of squares from fitting that column (after those to the left of it).
每个投影是一排每个观测矩阵和一个列每学期(onedf = FALSE)或每个系数(onedf = TRUE)。投影矩阵从默认的方法有正交列代表从QR分解的反应Q矩阵的列空间上的投影。拟合值预测的总和,并为每列的平方和平方和减少装修列(后它的左侧)。

The methods for lm and aov models add a column to the projection matrix giving the residuals (the projection of the data onto the orthogonal complement of the model space).
lm和aov模型的方法添加一列的投影矩阵,残差(数据投影到模型空间的正交补)。

Strictly, when onedf = FALSE the result is not a projection, but the columns represent sums of projections onto the columns of the model matrix corresponding to that term. In this case the matrix does not depend on the coding used.
严格来说,当onedf = FALSE结果是不是一个预测,但预测到这个词对应的模型矩阵的列列代表的金额。在这种情况下,矩阵并不取决于所使用的编码。


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



The design was inspired by the S function of the same name described
in Chambers <EM>et al.</EM> (1992).




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

Analysis of variance; designed experiments. Chapter 5 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth &amp; Brooks/Cole.

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

aov, lm, model.tables
aov,lm,model.tables


举例----------Examples----------


N <- c(0,1,0,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,0,0)
P <- c(1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,0,0,1,0,1,1,0)
K <- c(1,0,0,1,0,1,1,0,0,1,0,1,0,1,1,0,0,0,1,1,1,0,1,0)
yield <- c(49.5,62.8,46.8,57.0,59.8,58.5,55.5,56.0,62.8,55.8,69.5,
55.0, 62.0,48.8,45.5,44.2,52.0,51.5,49.8,48.8,57.2,59.0,53.2,56.0)

npk <- data.frame(block=gl(6,4), N=factor(N), P=factor(P),
                  K=factor(K), yield=yield)
npk.aov <- aov(yield ~ block + N*P*K, npk)
proj(npk.aov)

## as a test, not particularly sensible[#作为一个测试,不是特别懂事]
options(contrasts=c("contr.helmert", "contr.treatment"))
npk.aovE <- aov(yield ~  N*P*K + Error(block), npk)
proj(npk.aovE)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-4-21 20:35 , Processed in 0.021192 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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