parse.formula(Zelig)
parse.formula()所属R语言包:Zelig
Parsing user-input formulas into multiple syntax
解析用户输入的公式为多个语法
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Parse the input formula (or list of formulas) into the standard format described below. Since labels for this format will vary by model, parse.formula will evaluate a function describe.model, where model is given as an input to parse.formula.
分析输入的公式(公式列表)到下面描述的标准格式。由于这种格式的标签会因机型而异,parse.formula评估函数describe.model,其中model给定的输入parse.formula。
If the describe.model function has more than one parameter for which ExpVar = TRUE and DepVar = TRUE, then the user-specified equations must have labels to match those parameters, else parse.formula should return an error. In addition, if the formula entries are not unambiguous, then parse.formula returns an error.
如果describe.model函数有一个以上的参数的ExpVar = TRUE和DepVar = TRUE,则用户指定的方程必须具有这些参数相匹配的标签,其他parse.formula应返回一个错误。此外,,如果公式项不明确的,那么parse.formula返回一个错误。
用法----------Usage----------
parse.formula(formula, model, data = NULL)
参数----------Arguments----------
参数:formula
either a single formula or a list of formula objects
一个公式或formula对象的列表
参数:model
a character string specifying the name of the model
指定的模型名称的字符串
参数:data
an optional data frame for models that require a factor response variable
因子反应变量的模式,需要一个可选的数据框
Details
详细信息----------Details----------
Acceptable user inputs are as follows:
可接受的用户输入如下:
值----------Value----------
The output is a list of formula objects with class c("multiple", "list"). Let's say that the name of the model is "bivariate.probit", and the corresponding describe function is describe.bivariate.probit, which identifies mu1 and mu2 as systematic components, and an ancillary parameter rho, which may be parameterized, but is estimated as a scalar by default.
(作者)----------Author(s)----------
Kosuke Imai <<a href="mailto:kimai@princeton.edu">kimai@princeton.edu</a>>; Gary King
<<a href="mailto:king@harvard.edu">king@harvard.edu</a>>; Olivia Lau <<a href="mailtolau@fas.harvard.edu">olau@fas.harvard.edu</a>>; Ferdinand Alimadhi
<<a href="mailto:falimadhi@iq.harvard.edu">falimadhi@iq.harvard.edu</a>>
参见----------See Also----------
parse.par, model.frame.multiple, model.matrix.multiple, and the full Zelig manual at http://gking.harvard.edu/zelig.
parse.par,model.frame.multiple,model.matrix.multiple,Zelig手册http://gking.harvard.edu/zelig。
实例----------Examples----------
## Not run: [#不运行:]
data(sanction)
formulae <- list(cbind(import, export) ~ coop + cost + target)
fml <- parse.formula(formulae, model = "bivariate.probit")
D <- model.frame(fml, data = sanction)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|