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

R语言 sabreR包 sabre()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 21:22:54 | 显示全部楼层 |阅读模式
sabre(sabreR)
sabre()所属R语言包:sabreR

                                        Defining and Fitting SABRE Models
                                         SABRE模型的定义和装配

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

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

'sabre' is used to define and fit a SABRE model.
“军刀”是使用定义和适合SABRE模型的。


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


sabre(model.formula.uni, model.formula.bi = NULL, model.formula.tri = NULL,
    case, alpha = 0.01, approximate = 5, max.its = 100, arithmetic.type = "fast",
    offset = "", convergence = 5e-05, correlated = "yes", left.end.point = NULL,
    right.end.point = NULL, first.family = "binomial", second.family = "binomial",
    third.family = "binomial", first.link.function = "logit",
    second.link.function = "logit", third.link.function = "logit",
    first.mass = 12, second.mass = 12, third.mass = 12, ordered = FALSE,
    first.scale = -10000, second.scale = -10000, third.scale = -10000,
    first.rho = 0, second.rho = 0, third.rho = 0, first.sigma = 1,
    second.sigma = 1, third.sigma = 1, tolerance = 1e-06, equal.scale = FALSE,
    depend = FALSE, only.first.derivatives = FALSE, adaptive.quad = FALSE,
    fixed.effects = FALSE)



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

参数:model.formula.uni
Univariate model formula (mandatory)
单因素模型公式(强制性)


参数:model.formula.bi
Bivariate model formula
二元模型公式


参数:model.formula.tri
Trivariate model formula
三元模型公式


参数:case
List of variables which contain the case structure (one for univariate, two for bivariate or three for trivariate (mandatory)
列表中包含的情况下,结构的变量(一个单因素,双二元或三元(强制)


参数:alpha
Value of the orthogonality constant, which is used to trigger special action during the model fitting process. If the orthogonality criterion (which measures the propensity of the step direction to be orthogonal to the gradient) at any iteration is less than alpha, then the diagonal of the estimated Hessian matrix is doubled (after first ensuring that all elements on the diagonal are positive) and the iteration repeated. A low value of alpha will cause action to be taken only in conditions of bad orthogonality. A high value will cause special action to be taken often, and is not usually recommended.
实惠的正交性的常数,它是用来模型拟合过程期间触发特殊的行动。如果在任何迭代的正交性准则(该测量的步骤的方向的倾向是梯度正交)小于α-,然后估计Hessian矩阵对角线一倍(后首先确保在对角线上的所有元素是正)和重复迭代。低alpha值将要采取的行动,只有在条件不好的正交。较高的值会导致专项行动的时候,通常不推荐。


参数:approximate
approximate is the number of iterations (positive integer) which are to be performed using the Meilijson approximation to the Hessian matrix. This first derivative based approximation is more robust than the matrix of true second derivatives when the parameter estimates are a long way from their maximum likelihood solutions. For this reason, the first number iterations of any mixture model fit are carried out using the approximation to the Hessian. If the true Hessian is positive semi-definite on the (number+1)st iteration, then the algorithm switches to this matrix. Otherwise, the approximate method is retained until the true Hessian attains positive semi-definiteness. All further iterations continue to make use of the matrix of true second derivatives.
近似为进行使用Meilijson近似的Hessian矩阵的迭代次数(正整数)。基于一阶导数的近似值是更强大的比真正的二阶导数的矩阵参数估计时,从他们的最大可能的解决方案是一个很长的路要走。出于这个原因,任何混合物模型拟合的第一数量的迭代进行使用近似的Hessian。如果真实的Hessian是半正定(数量1)个迭代,则该算法切换到该矩阵。否则,近似的方法是一直保留,直到真正的黑森州获得正半定性。所有进一步的迭代继续利用真正的二阶导数的矩阵。

Note that, even if convergence is achieved within the first number iterations, the parameter estimate standard errors are still calculated from the true Hessian since it alone provides consistent estimates of their values.
请注意,即使内实现的第一数量的迭代收敛的参数估计值的标准误差仍然从真正的Hessian矩阵计算,因为它仅提供了一致的它们的值的估计。


参数:max.its
Sets to number the maximum number of iterations which are to be performed by the model fitting algorithm. For mixture models, the first approximate iterations use the Meilijson approximation to the Hessian, while the remaining (max.its - approximate) iterations use the matrix of true second derivatives.
设置与数要进行模型拟合算法的迭代的最大数量。对于混合模型,一次近似迭代使用Meilijson近似的Hessian,而余下的(max.its  - 近似)迭代使用真正的二阶导数的矩阵。


参数:arithmetic.type
Determines which method will be used in the calculation of the likelihood and its derivatives for mixture models. If arithmetic.type is "fast", then real numbers are stored in standard floating point format, which may potentially give rise to underflow problems for long sequences of observations for the same case. If arithmetic.type = "accurarte", then real numbers are stored in mantissa-exponent format, which prevents underflow but may significantly decrease the speed of the fitting algorithm. If underflow does occur while using the fast method, an error message will be returned and the fitting abandoned.
确定将使用哪种方法,在计算的可能性和它的衍生工具的混合模型。 ,如果arithmetic.type是“快”,然后真正的号码存储在标准的浮点格式,这可能会引起下溢问题的长时间序列的观测相同的情况下。如果arithmetic.type =的“accurarte”,则实数被存储在尾数指数格式,从而防止下溢,但可能会显着降低的拟合算法的速度。如果下溢的发生,而使用快速的方法,错误信息将被退回,配件抛弃。


参数:offset
Specifies the (quoted) name as an a priori known component to be included in the linear predictor during model fitting. The offset itself is an explanatory variable - which may be both subject and time period specific - whose coefficient is fixed at 1.0, and is thus constant throughout the fitting process. In order to include an offset in a homogeneous model, it is necessary to have a single mass point and no end points (see left.end.point, right.end.point, first.mass, second.mass and third.mass)
指定(引用)的名称,作为一个先验的线性预测模型的拟合过程中的已知成分。本身是说明变量的偏移 - 这可能是期间特定主题和时间 - 的系数被固定为1.0,因此,恒定的整个嵌合过程。为了包括均匀的模型中的偏移量,它是必要的,有一个单一的质点和与没有结束点(见left.end.point,right.end.point,first.mass,second.mass和third.mass)


参数:convergence
Sets the upper limit in difference in log-likelihood between subsequent iterations that has to be acheived for the model fitting to be deemed as converged.
设定上限在后续的迭代中,有被视为融合模型拟合会达不到差异之间的对数似然。


参数:correlated
Specifies whether a correlated or uncorrelated model is to be fitted. Applies only to bivariate and trivariate models.
指定是否相关或不相关的模型被安装。仅适用于二元和三元模型。


参数:left.end.point
Specificies the initial (numeric) value for the left end point. Setting left.end.point to NULL (the default) indicates that a left end point is not to be used. If a numeric value is specified then a left end point is used by the fitting algorithm starting with this initial value. Can only be used with univariate binary.
Specificies为左端点的初始值(数字)。设置left.end.point为NULL(默认值)表示,左端点是不被使用。如果被指定,那么一个数字值的左端点所使用的这个初始值开始的拟合算法。只能用单变量的二进制。


参数:right.end.point
Specificies the initial (numeric) value for the right end point. Setting right.end.point to NULL (the default) indicates that a right end point is not to be used. If a numeric value is specified then a right end point is used by the fitting algorithm starting with this initial value. Can only be used with univariate binary or univariate Poisson models.
Specificies右端点的初始值(数字)。设置right.end.point为NULL(默认值)表示,右端点是不被使用。如果一个数字值的右端点被指定,那么所使用的这个初始值开始的拟合算法。只能用单变量的二进制或单因素泊松模型。


参数:first.family
Specifies the distribution of the first dependent variable for univariate, bivariate or trivariate models. Values can be "binomial", "gaussian" or "poisson".
指定的一元,二元或三元模型的因变量的分布。值可以是“二项式”,“高斯”或“泊”。


参数:second.family
Specifies the distribution of the second dependent variable for univariate, bivariate or trivariate models. Values can be "binomial", "gaussian" or "poisson".
指定一元,二元或三元模型的第二个因变量的分布。值可以是“二项式”,“高斯”或“泊”。


参数:third.family
Specifies the distribution of the third dependent variable for trivariate models. Values can be "binomial", "gaussian" or "poisson".  
指定第三依赖三元模型变量的分布。值可以是“二项式”,“高斯”或“泊”。


参数:first.link.function
Specifies the first link function for univariate, bivariate or trivariate models. Values can be "l" (logit), "p" (probit), or "c" (complementary log-log).
指定一元,二元或三元模式的第一个链接的功能。值可以是“L”(罗吉特),“P”(概率),或“c”(互补双对数)。


参数:second.link.function
Specifies the second link function for bivariate or trivariate models. Values can be "l" (logit), "p" (probit), or "c" (complementary log-log).
指定的第二个链接功能,二元或三元模型。值可以是“L”(罗吉特),“P”(概率),或“c”(互补双对数)。


参数:third.link.function
Specifies the third link function for trivariate models. Values can be "l" (logit), "p" (probit), or "c" (complementary).
指定第三个环节三元模型的功能。值可以是“L”(罗吉特),“P”(概率),或“c”(互补)。


参数:first.scale
Sets the initial value (positive real number) for the first scale parameter in univariate, bivariate or trivariate models.
设置的第一个规模一元,二元或三元模型参数的初始值(正实数)。


参数:second.scale
Sets the initial value (positive real number) for the second scale parameter in bivariate and trivariate models.
设置为初始值(正实数)的二元和三元模型中的第2标度参数。


参数:third.scale
Sets the initial value (positive real number) for the third scale parameter in trivariate models.
设置在三元模型的第三尺度参数的初始值(正实数)。


参数:first.mass
Specifies the number of quadrature points for the first response in univariate, bivariate or trivariate models. Values can be 1,2,4,6,8,10,12,14,16,20,24,32,48,64,72,80,88,96,104,112,128,144,160,176,193,208,224,240 or 256.
指定的第一反应中的一元,二元或三元模型的正交点的数量。值可以是1,2,4,6,8,10,12,14,16,20,24,32,48,64,72,80,88,96,104,112,128,144,160,176,193,208,224,240或256。


参数:second.mass
Specifies the number of quadrature points for the second response in bivariate or trivariate models. Values can be 1,2,4,6,8,10,12,14,16,20,24,32,48,64,72,80,88,96,104,112,128,144,160,176,193,208,224,240 or 256.
指定在二元或三元模型中的第二个响应正交点的数量。值可以是1,2,4,6,8,10,12,14,16,20,24,32,48,64,72,80,88,96,104,112,128,144,160,176,193,208,224,240或256。


参数:third.mass
Specifies the number of quadrature points for the third response in trivariate models. Values can be 1,2,4,6,8,10,12,14,16,20,24,32,48,64,72,80,88,96,104,112,128,144,160,176,193,208,224,240 or 256.
指定的数量在三元模型的第三响应的正交点。值可以是1,2,4,6,8,10,12,14,16,20,24,32,48,64,72,80,88,96,104,112,128,144,160,176,193,208,224,240或256。


参数:first.sigma
Sets the initial value for the residual standard deviation (positive real number) in univariate, bivariate or trivariate models where the first response is linear.
设置剩余标准差(正实数),一元,二元或三元模型的第一反应是线性的初始值。


参数:second.sigma
Sets the initial value for the residual standard deviation (positive real number) in bivariate or trivariate models where the second response is linear.
的初始值设置为残余的标准偏差(正实数)中的二元或三元的模型,其中所述第二响应是线性的。


参数:third.sigma
Sets the initial value for the residual standard deviation (positive real number) in trivariate models where the third response is linear.
设置在三元模型,其中第三响应是线性的残余的标准偏差(正实数)的初始值。


参数:first.rho
Sets the initial value for the correlation parameter in bivariate models, or the first correlation parameter (corr(1,2)) in trivariate models.
设置二元模型中的相关参数,或三元模型中的第一相关参数(更正(1,2))的初始值。


参数:second.rho
Sets the initial value for the second correlation parameter (corr(1,3)) in trivariate models.
设置三元模型中的的第二相关参数(更正(1,3))的初始值。


参数:third.rho
Sets the initial value for the third correlation parameter (corr(2,3)) in trivariate models.
设置在三元模型的第三相关参数(更正(2,3))的初始值。


参数:ordered
Specifies an ordered response model if ordered="yes". This is an ordered probit if the link function is "probit" or an ordered logit if the link function is "logit".
如果订购指定一个有序的响应模型=“YES”。这是一个有序的概率,如果链接功能是“概率”或阶层罗吉特如果链接的功能是“罗吉特”。


参数:depend
If depend=TRUE then specifies a univariate random effects model with two scale parameters (first.scale & second.scale).
如果依靠= TRUE,则指定一个单变量的随机效应模型有两个的规模的参数(first.scale和second.scale)。


参数:equal.scale
If TRUE, specifies a bivariate random effects model in which both scale parameters are equal, so that the estimated random effects parameters in a subsequent model fit are first.scale = second.scale and correlated="yes".
如果为TRUE,则指定了一个二维随机效应模型在这两个的规模参数是相等的,所以,估计随机效应在随后的模型拟合参数first.scale = second.scale及相关=“YES”。


参数:only.first.derivatives
If TRUE, uses only the Meilijson approximation to the Hessian matrix (see approximate).
如果是TRUE,只使用Meilijson的近似Hessian矩阵(近似)。


参数:adaptive.quad
If TRUE, the employs adaptive quadrature.
如果是TRUE,采用自适应正交。


参数:tolerance
tolerance (numeric) sets the tolerance used in the matrix inversion routines to detect for extrinsic aliasing and lack of positive semi-definiteness.
(数字)公差设定的公差在矩阵求逆程序,外在的混叠和缺乏正半定性检测。


参数:fixed.effects
If fixed.effects=TRUE then a fixed effects model is fitted. The fixed effects model uses implicit dummy variables, with a dummy variable included for each unique value of the corresponding variable. The parameter estimates for these dummy variables are omitted from the output. Note that time-constant covariates (including the constant itself) should not be included in the model as they cannot be estimated and will be aliased out of the model.
装有,如果fixed.effects = TRUE然后固定效应模型。固定效应模型使用隐式的虚拟变量,用一个虚拟变量,包括为每一个独特的价值相应的变量。这些虚设变量的参数估计值从输出所省略。注意时间常数协变量(包括常量本身),不应该被包含在模型中,因为他们不能被估计将别名的模型。


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

Displays the progress of the model fitting. To see the details of the fitted model use print.
显示的模型拟合的进展。查看详细的拟合模型使用的打印。


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


Prof. R. Crouchley
Centre for e-Science
Lancaster University
Lancaster
United Kingdom
e-mail : asarc@exchange.lancs.ac.uk



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



# load data ...[加载数据...]
data(drvisits)
# ... and attach it[...并将其附加]
attach(drvisits)

# the first model[第一个模型]
sabre.model.1<-sabre(numvisit~reform+age+educ+married+badh+loginc+summer,
                     case=obs,
                     first.family="poisson")

# the second model[第二个模型]
sabre.model.2<-sabre(numvisit~reform+age+educ+married+badh+loginc+summer,
                     case=id,
                     first.family="poisson")

# compare them[对它们进行比较]
print(sabre.model.1)
print(sabre.model.2)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 02:48 , Processed in 0.028884 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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