SPM 软件介绍
SPM 数据挖掘预测分析软件是由美国 Salford Systems 公司开..PRSIM数据格式转换软件介绍
使用PSCAD仿真大型电力系统的情况产生了将第三方软件数据导..ATLAS.ti 定性分析软件介绍
ATLAS.ti是一个强大的用于定性分析文本、图形、音频和视频..nQuery 临床试验设计平台介绍
2020年,91%获得FDA批准的临床试验的组织使用nQuery进行样..GRAMS Suite光谱分析软件介绍
GRAMS可视化,处理和管理光谱数据使用Thermo Scientific GR..ACER ConQuest 通用项目响应建模软件介绍
ACER ConQuest是一个用于拟合一维和多维项目响应和潜在回归..AlleleID 物种识别和分类鉴别的综合软件
细菌鉴定的实验设计AlleleID是一款旨在解决细菌鉴定、病原..Intel oneAPI Base Toolkits 语言编译器
跨 CPU、GPU 和 FPGA 的异构开发Intel oneAPI Base Toolkit..FlowJo 流式细胞术分析平台
FlowJo具有直观的界面、专门的分析平台和开放式插件体系结..CYME Optimal Power Flow Analysis 电力工程软件和解决方案
识别并解决输电系统的异常情况CYME Optimal Power Flow Ana..
Python integration is one of the most exciting features in Stata 16. There are thousands of free Python packages that you can use to access and process data from the Internet, visualize data, explore data using machine-learning algorithms, and much more. You can use these Python packages interactively within Stata or incorporate Python code into your do-files. And there are a growing number of community-contributed commands that have familiar, Stata-style syntax that use Python packages as the computational engine. But there are a few things that we must do before we can use Python in Stata. This blog post will show you how to set up Stata to use Python.
Download and install Python
You may already have Python installed on your computer. You can check by typing python search in Stata.
The result tells us that no Python installations were found, so I will need to install Python. You may need to consult your system administrator if you are not the owner or administrator of the computer you are using.
You can download an installation file for Python at the Python download website. Python is available for Linux, Mac, and Windows, so you should select the installation file that corresponds to your operating system. You should select a 64-bit installation file because Stata/Python integration works only with 64-bit processors. Python 3.8.5 is the current version as I am writing this post, and I recommend using the latest version. Older versions of Python are available for download if you need them for backward compatibility, but versions older than Python 3.0 have now reached “end of life” status.
After you download the installation file, simply run it and follow the setup instructions. I have recorded a video that shows how to download and install Python for Windows 10 on a 64-bit computer.
Download and install Anaconda/Python
Python is also included in an open-source development environment called Anaconda. Many people prefer Anaconda because it automatically installs and manages many Python packages during installation. You can download the appropriate Anaconda installation file at the Anaconda download website. Anaconda is also available for Linux, Mac, and Windows, and you should select the 64-bit installation file that corresponds to your operating system. After you download the installation file, simply run it and follow the setup instructions. I have recorded a video that shows how to download and install Anaconda for Windows 10 on a 64-bit computer.
Setting up Stata to use Python
After you install Python or Anaconda, or both, on your computer, you can return to Stata and again type python search in the Command window.
I have installed both Python 3.8 and Anaconda 3.0 on my computer. I can tell Stata which Python installation I wish to use with the set python_exec command. The example below tells Stata that I wish to use Python 3.8.
You can type python query to see which Python installation you are currently using.
You can use set python_userpath to set additional paths for Python to look up packages and modules that you create or download. The example below uses set python_userpath to add the folder where I save my personal Python modules.
You can type python query to see which Python installation you are currently using.
Now we’re ready to use Python within Stata! You can begin using Python interactively by typing python in the Command window. Stata will remind you that you can type end to exit Python and return to Stata. The example below uses Python to print() the sentence “Hello Stata, I am Python” to the screen.
It worked! This blog post is the first in a series that I am writing to show you how to use Python within Stata. My goal is to provide a basic foundation so that you will have the skills to explore Python packages that are useful to you. This post demonstrated how to install Python and set up Stata to use Python. In my next post, I will demonstrate several ways to use Python from within Stata.
近期,武汉大学经济与管理学院联合Stata软件中国授权经销商北京天演融智软件有限公司(科学软件网)在七-八月份举办Stata系列专题讲座以及Stata软件研讨会,得到了大家的一致**。在此,科学软件网为大家提供三场讲座的回放以及“Stata洞察数据科学研讨会” 中李春涛老师主讲的主题为 “中文地图与Stata” 和 肖光恩老师主讲的主题为 “新冠疫情数据的可视化与建模方法” 的演讲回放视频,全部免费,可直接扫码(页面下方直接点 试听 )免费观看。
北京天演融智软件有限公司(科学软件网)是Stata软件在中国的授权经销商,为中国的Stata用户提供优质的软件销售和培训服务。
您是第3123002位访客
版权所有 ©2025 八方资源网 粤ICP备10089450号-8
北京天演融智软件有限公司 保留所有权利.
北京天演融智软件有限公司 保留所有权利.
技术支持: 八方资源网 八方供应信息 投诉举报 网站地图手机网站
微信号码
地址:北京市 海淀区 北京市海淀区上地东路35号院1号楼3层1-312-318、1-312-319
联系人:王经理女士
微信帐号:18510103847