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

R语言 spatstat包 model.depends()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 13:48:30 | 显示全部楼层 |阅读模式
model.depends(spatstat)
model.depends()所属R语言包:spatstat

                                         Identify Covariates Involved in each Model Term
                                         确定协变量在每个模型项

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

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

Given a fitted model (of any kind), identify which of the covariates is involved in each term of the model.
给定一个合适的模型(任何种类),确定每学期的模型协变量的参与。


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


model.depends(object)
model.is.additive(object)
model.covariates(object, fitted=TRUE, offset=TRUE)
has.offset.term(object)
has.offset(object)



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

参数:object
A fitted model of any kind.  
一个拟合模型的任何一种。


参数:fitted,offset
Logical values determining which type of covariates to include.  
逻辑值确定哪种类型的协变量。


Details

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

The object can be a fitted model of any kind, including models of the classes lm, glm and ppm.
object可以是任何形式的拟合模型,包括模型的类lm,glm和ppm。

To be precise, object must belong to a class for which there are methods for formula, terms and model.matrix.
确切的说,object必须属于一类有方法formula,terms和model.matrix。

The command model.depends determines the relationship between the original covariates (the data supplied when object was fitted) and the canonical covariates (the columns of the design matrix). It returns a logical matrix, with one row for each canonical covariate, and one column for each of the original covariates, with the i,j entry equal to TRUE if the ith canonical covariate depends on the jth original covariate.
命令model.depends确定原来的协变量(时提供的数据object拟合)和规范的协变量的设计矩阵(列)之间的关系。它返回一个逻辑矩阵,用一排的每个正则的协变量,和一列的每个原始的协变量,与i,j项等于TRUE当i。个正则协变量取决于j个原始的协变量。

If the model formula of object includes offset terms (see offset), then the return value of model.depends also has an attribute "offset". This is a logical value or matrix with one row for each offset term and one column for each of the original covariates, with the i,j entry equal to TRUE if the ith offset term depends on the jth original covariate.
如果模型公式object偏移项(见offset),然后返回值model.depends也有一个属性"offset"。这是一个逻辑值或矩阵的i,j项等于TRUE如果i第抵消术语依赖每个偏移项,与一列,一列原来的协变量, j个原始的协变量。

The command model.covariates returns a character vector containing the names of all (original) covariates that were actually used to fit the model. By default, this includes all covariates that appear in the model formula, including offset terms as well as  canonical covariate terms. To omit the offset terms, set offset=FALSE. To omit the canonical covariate terms, set fitted=FALSE.
命令model.covariates返回一个字符向量(原件)实际用于拟合模型的协变量的名称。默认情况下,包括中出现的所有协变量的模型公式,包括偏移,以及规范协条款。要忽略的偏移项,设置offset=FALSE。要省略的规范协条款,fitted=FALSE。

The command model.is.additive determines whether the model is additive, in the sense that there is no canonical covariate that depends on two or more original covariates. It returns a logical value.
命令model.is.additive确定模型是否是相加的,在这个意义上,是没有规范的协变量,依赖于两个或更多的原始协变量。它返回一个逻辑值。

The command has.offset.term is a faster way to determine whether the model formula includes an offset term.
命令has.offset.term模型公式,以确定是否包括offset术语是一个更快的方法。

The functions model.depends and has.offset.term only detect offset terms which are present in the model formula. They do not detect numerical offsets in the model object, that were inserted using the offset argument in lm, glm etc. To detect the presence of offsets of both kinds, use has.offset.
的功能model.depends和has.offset.termoffset模型中的公式存在的条款,只有检测。他们不检测数值的偏移量在模型对象中,插入offset使用参数lm,glm要检测是否存在两种偏移量,使用<X >。


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

A logical value or matrix.
逻辑值或矩阵。


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


Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>




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

ppm, model.matrix
ppm,model.matrix


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


   x <- 1:10
   y <- 3*x + 2
   z <- rep(c(-1,1), 5)
   fit <- lm(y ~ poly(x,2) + sin(z))
   model.depends(fit)
   model.covariates(fit)
   model.is.additive(fit)

   fitoff1 <- lm(y ~ x + offset(z))
   fitoff2 <- lm(y ~ x, offset=z)
   has.offset.term(fitoff1)
   has.offset(fitoff1)
   has.offset.term(fitoff2)
   has.offset(fitoff2)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-15 14:20 , Processed in 0.024390 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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