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.
近期,武漢大學(xué)經(jīng)濟(jì)與管理學(xué)院聯(lián)合Stata軟件中國授權(quán)經(jīng)銷商北京天演融智軟件有限公司(科學(xué)軟件網(wǎng))在七-八月份舉辦Stata系列專題講座以及Stata軟件研討會,得到了大家的一致**。在此,科學(xué)軟件網(wǎng)為大家提供三場講座的回放以及“Stata洞察數(shù)據(jù)科學(xué)研討會” 中李春濤老師主講的主題為 “中文地圖與Stata” 和 肖光恩老師主講的主題為 “新冠疫情數(shù)據(jù)的可視化與建模方法” 的演講回放視頻,全部免費(fèi),可直接掃碼(頁面下方直接點(diǎn) 試聽 )免費(fèi)觀看。
北京天演融智軟件有限公司(科學(xué)軟件網(wǎng))是Stata軟件在中國的授權(quán)經(jīng)銷商,為中國的Stata用戶提供優(yōu)質(zhì)的軟件銷售和培訓(xùn)服務(wù)。
詞條
詞條說明
30多年來,ALOGIT一直在**的建模者中被頻繁使用,在此期間不斷發(fā)展,以滿足**建模的需要。因此,ALOGIT具有很高的可靠性和眾多的功能和設(shè)施,這些對專業(yè)建模很有幫助。幫助文件概述了各種可能性(下載幫助文件壓縮包,但是需要注意的是這與較新版本的Windows不兼容)。ALOGIT估算了通用logit模型的參數(shù)。主要的功能有:樹型模型( 嵌套、分層的)與簡單的logit模型相比,它支持模型中的
GMS?是直觀、強(qiáng)大的地下水建模系統(tǒng),為地下水模擬的每一階段提供靈活的模擬工具,包括地點(diǎn)描述、模型開發(fā)、校準(zhǔn)、后處理和模型顯示等。Aquaveo持續(xù)開展*的水資源建模培訓(xùn)課程。所有講師在科學(xué)建模和可視化計(jì)算機(jī)程序的軟件開發(fā)方面擁有多年經(jīng)驗(yàn)。主講老師Alan?LemonAquaveo?中GMS開發(fā)團(tuán)隊(duì)的成員和軟件工程師。?Alan?擁有多年開發(fā)地下
Qualtrics在學(xué)術(shù)行業(yè)的應(yīng)用免費(fèi)研討會
Qualtrics是專門為學(xué)術(shù)研究和**市場調(diào)查服務(wù)設(shè)計(jì)的在線調(diào)查研究工具。**1.6萬+客戶,F(xiàn)ortune 100有**過85%的企業(yè)以及****學(xué)術(shù)機(jī)構(gòu)都在使用Qualtrics軟件。?科學(xué)軟件網(wǎng)作為Qualtrics軟件的授權(quán)經(jīng)銷商,聯(lián)合Qualtrics公司**舉辦在線研討會,內(nèi)容包括Qualtrics介紹,功能演示及應(yīng)用案例。會議結(jié)束后,還有Qulatrics的專業(yè)技術(shù)團(tuán)隊(duì),解
好課免費(fèi)享 | Stata軟件應(yīng)用視頻課程
。為有效阻斷疫情傳播、積極響應(yīng)相關(guān)政策,讓大家足不出戶也能學(xué)習(xí)到優(yōu)質(zhì)軟件的使用教程,科學(xué)軟件網(wǎng)再出大招,除了對旗下全線軟件視頻課程做出8.5折優(yōu)惠外,較開展“好課免費(fèi)享”活動。本期活動的軟件視頻課程是《計(jì)量統(tǒng)計(jì)分析與Stata軟件初級應(yīng)用視頻課程》,活動期間可以申請免費(fèi)觀看,活動結(jié)束后恢復(fù)原價(jià)。活動時間:即日起至2月20日,活動期間可以申請開通一個月免費(fèi)賬號。申請方式:請把您的單位、姓名、電話、郵
公司名: 北京天演融智軟件有限公司
聯(lián)系人: 張經(jīng)理
電 話:
手 機(jī): 18610814366
微 信: 18610814366
地 址: 北京海淀海淀上地東路35號院1號樓3層1-312318、1-312-319
郵 編:
網(wǎng) 址: turntech88.b2b168.com
公司名: 北京天演融智軟件有限公司
聯(lián)系人: 張經(jīng)理
手 機(jī): 18610814366
電 話:
地 址: 北京海淀海淀上地東路35號院1號樓3層1-312318、1-312-319
郵 編:
網(wǎng) 址: turntech88.b2b168.com
智能云閱卷機(jī) 高速閱讀機(jī) 讀卡機(jī)怎么識別答題卡
¥13800.00