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

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

[复制链接]
发表于 2012-10-1 12:18:05 | 显示全部楼层 |阅读模式
stls(truncSP)
stls()所属R语言包:truncSP

                                         Estimation of truncated regression models using the Symmetrically Trimmed Least Squares (STLS) estimator
                                         使用对称修剪最小二乘法(STLS)估计的截断回归模型的估计

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

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

Function for estimation of linear regression models with truncated response variables (fixed truncation point), using the STLS estimator (Powell 1986)
功能截断响应变量(固定截断点)的线性回归模型的估计,使用STLS估计(鲍威尔,1986年)


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


stls(formula, data, point = 0, direction = "left", beta = "ols",
   covar = FALSE, na.action, ...)
## S4 method for signature 'stls'
print(x, digits = max(3, getOption("digits") - 2),
    width= getOption("width"), ...)
## S4 method for signature 'stls'
summary(object, level=0.95, ...)
## S4 method for signature 'summary.stls'
print(x, digits= max(3, getOption("digits") - 2),
    width= getOption("width"), ...)
## S4 method for signature 'stls'
coef(object,...)
## S4 method for signature 'stls'
vcov(object,...)
## S4 method for signature 'stls'
residuals(object,...)
## S4 method for signature 'stls'
fitted(object,...)



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

参数:x, object
an object of class "stls"
一个对象的类"stls"


参数:formula
a symbolic description of the model to be estimated
以进行估计的模型的符号描述


参数:data
an optional data frame
一个可选的数据框


参数:point
the value of truncation (the default is 0)
截断值(默认是0)


参数:direction
the direction of truncation, either "left" (the default) or "right"
截断的方向,无论是"left"(默认)或"right"


参数:beta
the method of determining the starting values of the regression coefficients (See Details for more information):  
的方法确定初始值的回归系数(见详细信息详细信息):

The default method is "ols", meaning that the estimated regression coefficients from fitting a linear model with lm are used.  
默认的方法是"ols",这意味着拟合的线性模型的估计回归系数lm。

Method "ml" means that the estimated regression coefficients from fitting a maximum likelihood model for truncated regression, assuming Gaussian errors, are used. The maximum likelihood model is fitted using truncreg.  
方法"ml"是指截断回归模型拟合的最大似然,假设是高斯的错误,所使用的估计回归系数。最大似然模型安装使用truncreg。

The third option is to manually provide starting values as either a vector, column matrix or row matrix.  
第三个选项是手动提供的初始值作为向量,列矩阵或行矩阵。


参数:covar
logical. Indicates whether or not the covariance matrix should be estimated. If TRUE the covariance matrix is estimated using bootstrap. The default number of replicates is 200 but this can be adjusted (see argument ...). However, since the bootstrap procedure is time-consuming the default is covar=FALSE.
逻辑。指示是否应当估计的协方差矩阵。如果TRUE的协方差矩阵估计使用自举。默认的重复数为200,但可以调整(见参数...)。然而,由于自举过程是耗时的默认是covar=FALSE。


参数:na.action
a function which indicates what should happen when the data contain NAs.
一个函数,它表示当数据包含NA的,应该发生什么。


参数:digits
the number of digits to be printed      
要打印的数字位数


参数:width
the width of the printing
的宽度的印刷


参数:level
the desired level of confidence, for confidence intervals provided by summary.stls. A number between 0 and 1. The default value is 0.95.
所需的置信水平,置信区间提供summary.stls。 0和1之间的一个数字。默认值是0.95。


参数:...
additional arguments. For stls the number of bootstrap replicates can be adjusted by setting R=the desired number of replicates. Also the control argument of optim can be set by control=list().
其他参数。对于stls的数目自举复制可以通过调节设置R=所需数量的复制。此外,controloptim参数可以通过control=list()。


Details

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

Uses optim ("Nelder&ndash;Mead" method) to minimize the objective function described in Powell (1986) wrt the vector of regression coefficients in order to find the STLS estimates. The maximum number of iterations is set at 2000, but this can be adjusted by setting control=list(maxit=...) (see the ...&ndash;argument). <br><br> As the starting values of the regression coefficients can have a great impact on the result of the minimization it is recommended to use one of the methods for generating these rather than supplying the values manually (unless one is confident that one has a good idea of what the starting values should be).
使用optim(“内尔德酒法”),以最小化目标函数中描述的鲍威尔(1986年)相对于向量回归系数,以便找到STLS估计。最大迭代次数为2000,但可以调整设置control=list(maxit=...)(见参数)。 <BR> <BR>的回归系数作为初始值可以有很大的影响最小化的结果,它是推荐使用的方法之一,对产生这些,而不是手动提供的值(除非是确信一个的初始值应该是一个不错的主意)。


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

stls returns an object of class "stls". <br><br> The function summary prints a summary of the results, including two types of confidence intervals (normal approximation and percentile method). The generic accessor functions coef, fitted, residuals and vcov extract various useful features of the value returned by stls<br><br> An object of class "stls", a list with elements: <table summary="R valueblock"> <tr valign="top"><td>coefficients </td> <td> the named vector of coefficients</td></tr> <tr valign="top"><td>startcoef </td> <td> the starting values of the regression coefficients used by optim</td></tr> <tr valign="top"><td>value </td> <td> the value of the objective function corresponding to coefficients</td></tr> <tr valign="top"><td>counts </td> <td> number of iterations used by optim. See the documentation for optim for further details</td></tr> <tr valign="top"><td>convergence </td> <td> from optim. An integer code. 0 indicates successful completion. Possible error codes are <br> 1  indicating that the iteration limit maxit had been reached.<br> 10  indicating degeneracy of the Nelder&ndash;Mead simplex.</td></tr>         <tr valign="top"><td>message </td> <td> from optim. A character string giving any additional information returned by the optimizer, or NULL.</td></tr> <tr valign="top"><td>residuals </td> <td> the residuals of the model</td></tr> <tr valign="top"><td>fitted.values </td> <td> the fitted values</td></tr> <tr valign="top"><td>df.residual </td> <td> the residual degrees of freedom</td></tr> <tr valign="top"><td>call </td> <td> the matched call</td></tr> <tr valign="top"><td>covariance </td> <td> if covar=TRUE, the estimated covariance matrix</td></tr> <tr valign="top"><td>bootrepl </td> <td> if covar=TRUE, the bootstrap replicates</td></tr> </table>
stls返回一个对象类"stls"。参考参考的功能summary打印结果的摘要,包括两种类型的置信区间(正常逼近和百分位数法)。一般的访问功能coef,fitted,residuals和vcov提取各种有用的功能stls的<BR> <BR>的对象返回的值类"stls"“的元素的列表:<table summary="R valueblock"> <tr valign="top"> <TD>coefficients  </ TD> <TD>命名的系数向量< / TD> </ TR> <tr valign="top"> <TD> startcoef </ TD> <TD>的初始值的回归系数optim</ TD> </ TR> <tr valign="top"> <TD> value  </ TD> <TD> coefficients</ TD> </ TR> <TR VALIGN相应的目标函数值= “顶”> <TD> counts  </ TD> <TD>的迭代使用optim。请参阅文档optim的进一步详情</ TD> </ TR> <tr valign="top"> <TD> convergence </ TD> <TD>optim。的整数代码。 0表示成功完成。可能出现的错误代码是参考1表明,迭代限制的麦克斯特已经达到。参考10表示内尔德Mead单纯的退化。</ TD> </ TR> <tr valign="top"> <TD> message </ TD> <TD>optim。一个字符的字符串,给出了优化,或NULL。</ TD> </ TR> <tr valign="top"> <TD>residuals </ TD> <TD>的任何附加的信息该模型的残差</ TD> </ TR> <tr valign="top"> <TD>fitted.values  </ TD> <TD>的拟合值</ TD> </ TR> <TR VALIGN =“”> <TD>df.residual  </ TD> <TD>的剩余自由度</ TD> </ TR> <tr valign="top"> <TD>call  <TD>匹配的呼叫/ TD> </ TD> </ TR> <tr valign="top"> <TD> covariance  </ TD> <TD>如果covar“=  TRUE,估计协方差矩阵</ TD> </ TR> <tr valign="top"> <TD> bootrepl  </ TD> <TD>如果covar“=“TRUE,引导复制</ TD> </ TR> </ TABLE>


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



Anita Lindmark  and Maria Karlsson




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

Powell, J. (1986) Symmetrically Trimmed Least Squares Estimation for Tobit Models, Econometrika, 54(6), pp 1435&ndash;1460

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

stls.fit, the function that does the actual fitting <br><br> qme, for estimation of models with truncated response variables using the QME estimator <br><br> lt, for estimation of models with truncated response variables using the LT estimator <br><br> truncreg for estimating models with truncated response variables by maximum likelihood, assuming Gaussian errors
stls.fit“的功能的实际装修<BR> <BR>的不qme,使用的QME估计参考参考lt截断响应变量的模型估计,截断反应变量,使用LT估计参考参考模型估计truncreg截断响应变量的模型,通过最大似然估计,假设是高斯的错误


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


##Simulate a data.frame[#模拟数据框]
n <- 10000
x1 <- runif(n,0,10)
x2 <- runif(n,0,10)
x3 <- runif(n,-5,5)
x4 <- runif(n,5,10)
x5 <- runif(n,-5,5)
y <- 1-2*x1+x2+2*x3+x4-x5+rnorm(n,0,2)
d <- data.frame(y=y,x1=x1,x2=x2,x3=x3,x4=x4,x5=x5)

##Use a truncated subsample[#使用截断的子样本]
dtrunc <- subset(d, y>0)
  
##Use stls to estimate the model[#使用次抢断估计模型]
stls(y~x1+x2+x3+x4+x5, dtrunc, point=0, direction="left", beta="ols", covar=FALSE)


##Example using data "PM10trunc"[#示例使用数据“PM10trunc”]
data(PM10trunc)

stlspm10 <-
stls(PM10~cars+temp+wind.speed+temp.diff+wind.dir+hour+day, data=PM10trunc, point=2)

summary(stlspm10)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 12:33 , Processed in 0.040146 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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