用于阶乘测量设计的python包
fsdesign的Python项目详细描述
因子调查设计
用于阶乘调查设计的python包
- 自由软件:麻省理工学院许可证
- 文档:https://fsdesign.readthedocs.io。
功能
- vignettes析因设计生成
安装
使用pip:
$ pip install fsdesign
使用量
作为命令行工具
$ fsdesign [OPTIONS]
选项:
-t, --template PATH Path to template text file for vignettes
-f, --factors PATH Path to factors csv file
-s, --size INTEGER Number of resulting vignettes
-o, --output PATH Output file path
-d, --duplicates Flag for duplicated vignettes
--help Show usage and options information.
示例:
$ fsdesign -t my_template.txt -f my_factors.csv -s 370 -o vignettes.csv -d
模板文件示例:
Peter is a {job_title}.
During the last year he has been using {drug_type} {frequency}.
系数csv示例:
job_title drug_type frequency college professor alcohol occasionally police officer tobacco often student cocaine daily salesman marijuana nightclub waiter amphetamines
输出是一个csv文件,包含:
- 增量唯一ID
- 渐晕图文本
- 为渐晕图中的因素赋值
示例:
ID Text job_title drug_type frequency 1 Peter is a student […] student alcohol daily 2 Peter is a salesman […] salesman tobacco often 3 Peter is a student […] student marijuana occasionally
重要信息:建议使用google电子表格创建
系数csv(文件->;导出为csv)以及导入输出
CSV以避免字符编码问题
应用程序可能会导致。
历史记录
0.1.0(2018-02-15)
- pypi上的第一个版本。