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

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

[复制链接]
发表于 2012-9-30 01:47:36 | 显示全部楼层 |阅读模式
analyzeSGP(SGP)
analyzeSGP()所属R语言包:SGP

                                        Analyze student data to produce student growth percentiles and student growth projections
                                         分析学生的数据,学生的成长产生百分点和学生的成长预测

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

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

Utility function/exemplar used to produce student growth percentiles and student growth projections using long formatted data like that provided by prepareSGP.
实用功能/的模范用于学生的成长百分位值和学生的成长预测,使用长格式的数据,如提供的prepareSGP。


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


analyzeSGP(sgp_object,
         state=NULL,
         years=NULL,
         content_areas=NULL,
         grades=NULL,
         sgp.percentiles=TRUE,
         sgp.projections=TRUE,
         sgp.projections.lagged=TRUE,
         sgp.percentiles.baseline=TRUE,
         sgp.projections.baseline=TRUE,
         sgp.projections.lagged.baseline=TRUE,
         sgp.percentiles.baseline.max.order=3,
         sgp.projections.baseline.max.order=3,
         sgp.projections.lagged.baseline.max.order=3,
         sgp.use.my.coefficient.matrices=NULL,
         simulate.sgps=TRUE,
         goodness.of.fit.print=TRUE,
         sgp.config=NULL,
         sgp.config.drop.nonsequential.grade.progression.variables=TRUE,
         sgp.baseline.panel.years=NULL,
         sgp.baseline.config=NULL,
         parallel.config=NULL,
         ...)



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

参数:sgp_object
An object of class SGP containing long formatted data in the code (from prepareSGP) slot.   
类的一个对象SGP包含长code(prepareSGP)插槽格式的数据。


参数:state
Acronym indicating state associated with the data for access to embedded knot and boundaries, cutscores, CSEMs, and other state related assessment data.  
首字母缩写,表示状态与嵌入式结和边界,cutscores,CSEMs,和其他国家的相关评估数据访问的数据。


参数:years
A vector indicating year(s) in which to produce student growth percentiles and/or student growth projections/trajectories. If missing the  function will use the data to infer the year(s) based upon the assumption of having at least three years of panel data for analyses.  
一个矢量年(S),其中以学生的成长百分位值和/或学生的成长预测/轨迹。如果缺少该功能将利用这些数据来推断的假设有至少3年的面板数据进行分析后,根据年度(S)。


参数:content_areas
A vector indicating content area(s) in which to produce student growth percentiles and/or student growth projections/trajectories.  If left missing the function will use the data to infer the content area(s) available for analyses.  
A向量说明的内容面积(S),在其中学生的成长百分位值和/或学生的成长预测/轨迹。如果任由缺少的功能将利用这些数据来推断的内容面积(S)进行分析。


参数:grades
A vector indicating grades for which to calculate student growth percentiles and/or student growth projections/trajectories.  If left missing the function will use the data to infer all the grade progressions for student growth percentile and student growth projections/trajectories analyses.  
一个向量,表示牌号为学生的成长百分位值和/或学生的成长预测/轨迹计算。如果任由缺少的功能将利用这些数据来推断所有等级的级数为学生的成长百分位数和学生的成长预测/轨迹分析。


参数:sgp.percentiles
Boolean variable indicating whether to calculate student growth percentiles. Defaults to TRUE.  
布尔变量,表示是否计算学生的成长百分。默认为true。


参数:sgp.projections
Boolean variable indicating whether to calculate student growth projections. Defaults to TRUE.  
布尔变量,表示是否计算学生的成长预测。默认为true。


参数:sgp.projections.lagged
Boolean variable indicating whether to calculate lagged student growth projections often used for growth to standard analyses. Defaults to TRUE.  
通常用于布尔变量,表示是否计算落后于学生的成长预测增长到标准的分析。默认为true。


参数:sgp.percentiles.baseline
Boolean variable indicating whether to calculate baseline student growth percentiles and/or coefficient matrices. Defaults to FALSE.  
布尔变量,表示是否计算基准学生的成长百分位值和/或系数矩阵。默认为false。


参数:sgp.projections.baseline
Boolean variable indicating whether to calculate baseline student growth projections. Defaults to FALSE.  
布尔变量,表示是否计算基准学生的成长预测。默认为false。


参数:sgp.projections.lagged.baseline
Boolean variable indicating whether to calculate lagged baseline student growth projections. Defaults to FALSE.  
布尔变量,表示是否落后于基准计算学生的成长预测。默认为false。


参数:sgp.percentiles.baseline.max.order
Integer indicating the maximum order to calculate baseline student growth percentiles (regardless of maximum coefficient matrix order). Default is 3. To utilize the maximum matrix order, set to NULL.  
整数,表示最大为计算基准学生的成长百分(不论的最大系数矩阵的阶)。默认值是3。最大限度地利用矩阵的阶,设置为NULL。


参数:sgp.projections.baseline.max.order
Integer indicating the maximum order to calculate baseline student growth projections (regardless of maximum coefficient matrix order). Default is 3. To utilize the maximum matrix order, set to NULL.  
整数,表示最大为计算基准学生的成长预测(不论的最大系数矩阵的阶)。默认值是3。最大限度地利用矩阵的阶,设置为NULL。


参数:sgp.projections.lagged.baseline.max.order
Integer indicating the maximum order to calculate lagged baseline student growth projections (regardless of maximum coefficient matrix order).  Default is 3.  To utilize the maximum matrix order, set to NULL.  
整数,表示最大的以计算滞后基线学生的成长预测(不论的最大系数矩阵的阶)。默认值是3。最大限度地利用矩阵的阶,设置为NULL。


参数:sgp.use.my.coefficient.matrices
Arugment, defaults to NULL indicating whether to use coefficient matrices to calcualte student growth percentiles embedded in provided object of  same name as those provided by the sgp.labels argument.  
Arugment,默认为null,指示是否使用系数矩阵calcualte提供的对象提供的sgp.labels参数相同的名称嵌入在学生的成长百分。


参数:simulate.sgps
Boolean variable indicating whether to simulate SGP values for students based on test-specific Conditional Standard Errors of Measurement (CSEM).  Test CSEM data must be available for simulation and included in SGPstateData.  This argument must be set to TRUE for confidence interval construction. Defaults to TRUE.  
布尔变量,表示是否模拟SGP值根据具体的测试条件标准误差的测量(CSEM)的学生。测试CSEM数据必须是可用的仿真和包含在SGPstateData。该参数必须设置为TRUE的置信区间施工。默认为true。


参数:goodness.of.fit.print
Boolean variable indicating whether to print out Goodness of Fit figures as pdf into a directory labeled Goodness of Fit. Defaults to TRUE.  
布尔变量,表示是否打印到一个目录标记的拟合优度为PDF善良的适合数字。默认为true。


参数:sgp.config
If years, content_areas, and grades are missing, user can directly specify a list containing three vectors: baseline.content.areas, baseline.panel.years, and baseline.grade.sequences. This advanced option is helpful for analysis of non-traditional grade progressions and other special cases. See examples for use cases.  
如果years,content_areas和grades缺少,用户可以直接指定一个列表,其中包含三个向量:baseline.content.areas,baseline.panel.years和baseline.grade.sequences 。这种先进的选项,非传统的等级级数和其他特殊情况的分析是有帮助的。用例的例子。


参数:sgp.config.drop.nonsequential.grade.progression.variables
Boolean variable (defaults to TRUE) indicating whether non-sequential grade progression variables should be dropped when sgp.config is processed. For example, if a grade progression of c(3,4,6) is provided, the data configuration will assume (default is TRUE) that data for a missing year needs to be dropped prior to applying studentGrowthPercentiles or studentGrowthProjections to the data.   
布尔变量(默认为true)表明被处理sgp.config时,非连续级发展变量是否应该被丢弃。例如,如果一个档次进展的c(3,4,6)设置,将假定的数据配置(默认为TRUE),一个丢失的年需求的数据被丢弃之前施加studentGrowthPercentiles或studentGrowthProjections的数据。


参数:sgp.baseline.panel.years
A vector of years to be used for baseline coefficient matrix calculation. Default is to use most recent five years of data.
年的向量用于基线系数矩阵计算。默认是使用最近五年的数据。


参数:sgp.baseline.config
A list containing three vectors: sgp.content.areas, sgp.panel.years, sgp.grade.sequences indicating how baseline student growth percentile analyses are to be conducted. In almost all cases this value is calculated by default within the function but can be specified directly for advanced use cases. See source code for more detail on this configuration option.  
一个列表,其中包含三个向量:sgp.content.areas,sgp.panel.years,sgp.grade.sequences表明基线学生的增长百分分析是如何进行的。在几乎所有的情况下,此值默认情况下,在该函数中计算,但可以直接指定为高级用例。此配置选项的更多详细信息,请参阅源代码。


参数:parallel.config
A named list with, at a minimum, two elements indicating 1) the BACKEND package to be used for parallel computation and 2) the WORKERS list to specify the number of processors to be used in each major analysis.  The BACKEND element can be set = to FOREACH, SNOW, MULTICORE, or PARALLEL.  Please consult the manuals and vignettes for information of these packages!  TYPE is a third element of the parallel.config list that provides necessary information when using FOREACH, SNOW or PARALLEL packages as the backend. With BACKEND="FOREACH", the TYPE element specifies the "doMC", "doMPI", "doSNOW", "doRedis" or "doParallel" flavor of foreach backends.   If BACKEND = "SNOW", the TYPE element specifies the users preferred cluster type (either "SOCK" for socket cluster of "MPI" for an OpenMPI cluster).  The function will create a cluster object based on these parameters and the number of workers requested (see WORKERS list description below).  Alternatively, the name of an external CLUSTER.OBJECT set up by the user outside of the function can be used.   If BACKEND = "PARALLEL", the parallel package will be used, and the TYPE element specifies the users preferred cluster type if a SNOW type cluster is used.  If Windows is the operating system, this element must = "SOCK".  Defaults are assigned based on operating system if TYPE is missing based on system OS.  Unix/Mac OS defaults to MULTICORE to avoid presheduling.  SNOW can be chosen by specifying "SOCK" or "SNOW" in the TYPE element.  The WORKERS list must contain, at a minimum, a single number of processors (nodes) desired or available.  If WORKERS is specified in this manner, then the same number of processors will be used for each analysis type (sgp.percentiles, sgp.projections, ...  sgp.projections.lagged.baseline).  Alternatively, the user may specify the numbers of processors used for each analysis.  This allows for better memory management in systems that do not have enough RAM available per core.  The choice of the number of cores is a balance between the number of processors available, the amount of RAM a system has and the size of the data (sgp_object).  Each system will be different and will require some tailoring.  One rule of thumb used by the authors is to allow for 4GB of memory per core used for running large state data.  The SGP Demonstration (and data that size) requires more like 1-2GB per core.  As an example, PERCENTILES=4 and  PROJECTIONS=2 might be used on a quad core machine with 4 GB of RAM.  This will use all 4 cores available for the sgp.percentiles analysis and 2 cores for the sgp.projections analysis (which requires more memory than available).  The WORKERS list accepts these elements:   PERCENTILES, PROJECTIONS (for both cohort and baseline referenced projections), LAGGED_PROJECTIONS (for both cohort and baseline referenced lagged projections), BASELINE_MATRICES (used to produce the baseline coefficient matrices when not available in SGPstateData - very computationally intensive), BASELINE_PERCENTILES (SGP calculation only when baseline coefficient matrices have already been produced and are available - NOT very computationally intensive).  Example use cases are provided below.  
命名列表,至少两个元素的指示1)的后端封装,可用于并行计算和2)工人列表中指定的处理器中使用的每个主要分析。后端元素可以被设置为FOREACH,SNOW,MULTICORE或PARALLEL。请参考手册和护身符的信息,这些包的! TYPE的parallel.config列表,提供必要的信息时,使用foreach,雪或作为后端的并行包的第三个元素。与后端的“foreach”的类型元素指定“doMC”,“doMPI”中,“doSNOW”中,“doRedis”或“doParallel的foreach后端”的味道。如果BACKEND =“SNOW”的类型元素指定用户的首选聚类类型(无论是“SOCK”插座“MPI聚类”的openmpi聚类)。该函数将这些参数和要求的工人数量(见职工下面的列表描述)的基础上创建一个聚类对象。或者,可以使用由用户建立的函数的外部的外部CLUSTER.OBJECT名称。如果BACKEND的“水货”,parallel包将被使用,和type元素指定用户的首选雪的类型聚类的聚类类型,如果使用。如果Windows操作系统,该元素必须=“SOCK”的。默认值是基于操作系统分配,如果TYPE失踪OS系统的基础上。的Unix / Mac的OS默认向多核避免presheduling。 SNOW可以选择通过指定“SOCK”或“SNOW”的类型元素。的工人名单中必须包含至少需要一个单一的处理器数量(节点)或。如果以这种方式指定工,然后在相同数量的处理器将被用于每个分析的类型(sgp.percentiles,sgp.projections,... sgp.projections.lagged.baseline)。可替代地,用户可以指定用于每种分析的处理器的数目。这样就可以更好的内存管理,在没有足够的RAM每个核心的系统。的核心数的选择是可用的处理器的数量,量之间的平衡的系统所具有的RAM和的数据(sgp_object)大小。每个系统都将会有所不同,将需要一些调整。作者所使用的经验法则是允许为4GB的内存,每个核心用于运行大型国有数据。需要更多的像1-2GB,每个核心的的SGP示范(和数据大小)。作为一个例子,百分位数= 4和预测= 2可能是一个四核心的机器上使用4 GB的RAM。这将使用所有4个内核的sgp.percentiles分析和2个核心的sgp.projections分析(这需要更多的内存比可用)。工人接受了这些元素:百分位数,预测(引用队列和基线预测),LAGGED_PROJECTIONS(引用队列和基线滞后预测),BASELINE_MATRICES(用于生产的基准系数矩阵时不可用在SGPstateData  - 非常密集计算),BASELINE_PERCENTILES(SGP计算,只有当基准系数矩阵已经被生产和提供 - 不是很密集计算)。在下面的示例用例提供。


参数:...
Arguments to be passed to studentGrowthPercentiles or studentGrowthProjections for finer control over SGP calculations. NOTE: arguments can only be passed to one lower level function at a time, and only student growth percentiles OR projections can be created but not both at the same time.  
要传递studentGrowthPercentiles或studentGrowthProjectionsSGP计算更精确地控制。注意:参数可以被传递到一个较低的水平功能的时间,并,只有学生的增长百分位或预测可以被创建,但不都在同一时间。


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

Function returns a list containing the long data set in the Data slot as a data.table keyed using VALID_CASE, CONTENT_AREA,  YEAR, ID and the student growth percentile and/or student growth projection/trajectory results in the SGP slot.
函数返回一个列表,其中包含Data插槽设置在长数据作为data.table键使用VALID_CASE,CONTENT_AREA,YEAR,ID学生的成长百分位和/或学生的成长SGP插槽的投影/轨迹。


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


Damian W. Betebenner <a href="mailto:dbetebenner@nciea.org">dbetebenner@nciea.org</a> and Adam Van Iwaarden <a href="mailto:vaniwaarden@colorado.edu">vaniwaarden@colorado.edu</a>



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

prepareSGP, combineSGP
prepareSGP,combineSGP


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


## Not run: [#不运行:]
## analyzeSGP is Step 2 of 5 of abcSGP[#analyzeSGP是第2步5 abcSGP]
Demonstration_SGP <- sgpData_LONG
Demonstration_SGP <- prepareSGP(Demonstration_SGP)
Demonstration_SGP <- analyzeSGP(Demonstration_SGP)

## Or (explicitly pass state argument)[#(显式传递状态参数)]

Demonstration_SGP <- prepareSGP(sgpData_LONG)
Demonstration_SGP <- analyzeSGP(Demonstration_SGP, state="DEMO")

###[##]
###  Example uses of the sgp.config argument[##示例使用的sgp.config参数]
###[##]

#  Use only 3 years of Data, for grades 3 to 6[使用仅3年的数据,3至6年级]
#  and only perform analyses for most recent year (2012)[进行分析最近一年(2012年)]

my.custom.config <- list(
MATHEMATICS.2011_2012 = list(
        sgp.content.areas=rep("MATHEMATICS", 3), # Note, must be same length as sgp.panel.years[请注意,必须是相同的长度,sgp.panel.years]
        sgp.panel.years=c('2009_2010', '2010_2011', '2011_2012'),
        sgp.grade.sequences=list(3:4, 3:5, 4:6)),
READING.2011_2012 = list(
        sgp.content.areas=rep("READING", 3),
        sgp.panel.years=c('2009_2010', '2010_2011', '2011_2012'),
        sgp.grade.sequences=list(3:4, 3:5, 4:6)))

Demonstration_SGP <- prepareSGP(sgpData_LONG)
Demonstration_SGP <- analyzeSGP(Demonstration_SGP,
        sgp.config=my.custom.config,
        sgp.percentiles.baseline = FALSE,
        sgp.projections.baseline = FALSE,
        sgp.projections.lagged.baseline = FALSE,
        simulate.sgps=FALSE)


##  Another example sgp.config list:[#另一个例子sgp.config列表:]

#  Use different CONTENT_AREA priors, and only 1 year of prior data[使用不同的CONTENT_AREA先验的,只有1年之前的数据]
my.custom.config <- list(
MATHEMATICS.2011_2012.READ_PRIOR = list(
        sgp.content.areas=c("READING", "MATHEMATICS"),
        sgp.panel.years=c('2010_2011', '2011_2012'),
        sgp.grade.sequences=list(3:4, 4:5, 5:6)),
READING.2011_2012.MATH_PRIOR = list(
        sgp.content.areas=c("MATHEMATICS", "READING"),
        sgp.panel.years=c('2010_2011', '2011_2012'),
        sgp.grade.sequences=list(3:4, 4:5, 5:6)))


## An example showing multiple priors within a single year[#在一个单一的一个例子显示多个先验]

Demonstration_SGP <- prepareSGP(sgpData_LONG)

DEMO.config <- list(
READING.2010_2011 = list(
        sgp.content.areas=c("MATHEMATICS", "READING", "MATHEMATICS", "READING", "READING"),
        sgp.panel.years=c('2008_2009', '2008_2009', '2009_2010', '2009_2010', '2010_2011'),
        sgp.grade.sequences=list(c(3,3,4,4,5), c(4,4,5,5,6), c(5,5,6,6,7), c(6,6,7,7,8))),
MATHEMATICS.2010_2011 = list(
        sgp.content.areas=c("READING", "MATHEMATICS", "READING", "MATHEMATICS", "MATHEMATICS"),
        sgp.panel.years=c('2008_2009', '2008_2009', '2009_2010', '2009_2010', '2010_2011'),
        sgp.grade.sequences=list(c(3,3,4,4,5), c(4,4,5,5,6), c(5,5,6,6,7), c(6,6,7,7,8))))

Demonstration_SGP <- analyzeSGP(Demonstration_SGP,
                                          sgp.config=DEMO.config,
                                          sgp.projections=FALSE,
                                          sgp.projections.lagged=FALSE,
                                          sgp.percentiles.baseline=FALSE,
                                          sgp.projections.baseline=FALSE,
                                          sgp.projections.lagged.baseline=FALSE,
                                          sgp.config.drop.nonsequential.grade.progression.variables=FALSE)


###[##]
###  Example uses of the parallel.config argument[##示例使用的parallel.config参数]
###[##]

##  Windows users must use snow:[#Windows用户必须使用雪:]
#  possibly a quad core machine with low RAM Memory[可能是低的RAM内存四核机]
#  4 workers for percentiles, 2 workers for projections.[4名工人百分位数,2名工人的预测。]
#  Note the SOCK type cluster is used for single machines.[请注意SOCK类型的聚类用于单台机器。]

Demonstration_SGP <- prepareSGP(sgpData_LONG)
Demonstration_SGP <- analyzeSGP(Demonstration_SGP,
        parallel.config=list(
                BACKEND="SNOW", TYPE="SOCK",
                WORKERS=list(PERCENTILES=4,
                    PROJECTIONS=2,
                    LAGGED_PROJECTIONS=2,
                    BASELINE_PERCENTILES=4))

##  Windows users with R version &gt;= 2.14.0  may prefer the parallel package:[#R版本的Windows用户提供> = 2.14.0可能会喜欢的并行包:]
#  This example is would be good for a single workstation with 8 cores[这个例子将是很好的一个单一的工作站,8个核心]
#  and enough RAM to use 8 workers for ALL analyses.[和足够的内存来使用所有的分析的8名工人。]
        ...
        parallel.config=list(
                BACKEND="PARALLEL", TYPE="SOCK"),
                WORKERS=8)
        ...

#  A similar specification for R versions pre 2.13 using SNOW:[R版本中使用雪前的2.13类似的规范:]
        ...
        parallel.config=list(
                BACKEND="SNOW", TYPE="SOCK"),
                WORKERS=8)
        ...

##  Linux/Mac may use the multicore package directly:[#在Linux / Mac可能会直接使用多核包:]
        ...
        parallel.config=list(
                BACKEND="MULTICORE",
                WORKERS=4)
        ...

## FOREACH use cases:[#中的foreach用例:]
# doMC - only available on Linux or Mac OSX[doMC  - 仅适用于Linux或Mac OSX]
        ...
        parallel.config=list(
                BACKEND="FOREACH", TYPE="doMC",
                WORKERS=3)
        ...

#  doMPI package -  the number of workers is 100, [doMPI包 - 工人数为100,]
#  suggesting this example is for a HPC cluster usage.[这例子是一个HPC聚类使用。]
        ...
        parallel.config=list(
                BACKEND="FOREACH", TYPE="doMPI",
                WORKERS=100)
        ...


##  New parallel package - only available with R 2.13 or newer[#新的并行包 - 仅适用于与R 2.13或更新版本]
#  Note there are up to 16 workers, and MPI is used, [注意:有多达16个工人,并使用MPI,]
#  suggesting this example is for a HPC cluster, possibly Windows OS.[这例子是一个HPC聚类,可能是Windows操作系统。]
        ...
        parallel.config=list(
                BACKEND="PARALLEL", TYPE="MPI",
                WORKERS=list(PERCENTILES=16,
                    PROJECTIONS=8,
                    LAGGED_PROJECTIONS=6,
                    BASELINE_PERCENTILES=12))
        ...

#  NOTE:  This list of parallel.config specifications is NOT exhaustive.  [注意:这parallel.config规格列表并不详尽。]
#  See examples in analyzeSGP documentation for some others.0[请参阅一些others.0的analyzeSGP文件中的示例]

###[##]
###  Advanced Example: restrict years, recalculate baseline SGP[##高级的例子:限制年,重新计算基准SGP]
###  coefficient matrices, and use parallel processing[##的系数矩阵,并利用并行处理]
###[##]

#  Remove existing DEMO baseline coefficient matrices from[删除现有的DEMO基准系数矩阵]
#  the SGPstateData object so that new ones will be computed.[SGPstateData对象,以便新的计算。]

SGPstateData$DEMO$Baseline_splineMatrix <- NULL

#  set up a customized sgp.config list[了一个定制的sgp.config列表设置]

        . . .

#  set up a customized sgp.baseline.config list[了一个定制的sgp.baseline.config列表设置]

        . . .

#  to be completed[要完成]


## End(Not run)  [#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-21 12:47 , Processed in 0.033769 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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