Stata/Python integration part 1: Setting up Stata


    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ù)。



    北京天演融智軟件有限公司專注于matlab,stata,spsspro,pscad,gams,nvivo,cyme,gms,mathematica等

  • 詞條

    詞條說明

  • ALOGIT 統(tǒng)計(jì)建模軟件介紹

    30多年來,ALOGIT一直在**的建模者中被頻繁使用,在此期間不斷發(fā)展,以滿足**建模的需要。因此,ALOGIT具有很高的可靠性和眾多的功能和設(shè)施,這些對專業(yè)建模很有幫助。幫助文件概述了各種可能性(下載幫助文件壓縮包,但是需要注意的是這與較新版本的Windows不兼容)。ALOGIT估算了通用logit模型的參數(shù)。主要的功能有:樹型模型( 嵌套、分層的)與簡單的logit模型相比,它支持模型中的

  • 使用 GMS 軟件進(jìn)行地下水流動和傳輸建模

    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)系方式 聯(lián)系我時,請告知來自八方資源網(wǎng)!

公司名: 北京天演融智軟件有限公司

聯(lián)系人: 張經(jīng)理

電 話:

手 機(jī): 18610814366

微 信: 18610814366

地 址: 北京海淀海淀上地東路35號院1號樓3層1-312318、1-312-319

郵 編:

網(wǎng) 址: turntech88.b2b168.com

相關(guān)閱讀

仙桃工地沖洗設(shè)備廠家 鋼質(zhì)玻璃*門級別分類標(biāo)準(zhǔn)河北九安*門 **煤礦生產(chǎn):炸藥的安全與**存放箱 長園深瑞 ISA-367G線路保護(hù) 潮州Ss16螺紋道釘工廠 全自動氮吹儀干式加熱與水浴加熱哪個濃縮較快 日照污水處理菌價(jià)格 120千瓦柴油發(fā)電機(jī)參數(shù)規(guī)格 金屬拋光利器,吉爾康磁力拋光機(jī)讓生產(chǎn)快人一步 益陽學(xué)籍檔案異常處理單位 AI賦能工廠大氣揚(yáng)塵治理智慧化解決方案 碳化硅耐火材料的特性和應(yīng)用 2025中國鎖具安防門業(yè)產(chǎn)品展 淮安碳纖維布廠家 石家莊認(rèn)咨詢辦理公司 免費(fèi)資源|Wolfram COVID-19視頻課程資源 MATLAB and Simulink 系列微直播 | 2020年4月 EViews 統(tǒng)計(jì)計(jì)量軟件介紹 一 MAGNETO二維磁性設(shè)計(jì)軟件視頻教程 SMS 完整的地表水解決方案 V13.3功能較新 Qualtrics在學(xué)術(shù)行業(yè)的應(yīng)用免費(fèi)研討會 Stata軟件免費(fèi)學(xué)系列 2023年4-5月免費(fèi)MAXQDA在線研討會 SPSS視頻課程年度大促已開啟,一定要看哦! HYDRUS模擬多孔介質(zhì)中水的流動和污染物的運(yùn)移培訓(xùn) 好課免費(fèi)享|統(tǒng)計(jì)與質(zhì)量工具M(jìn)initab軟件應(yīng)用課程 Stata命令chatgpt,運(yùn)行ChatGPT(二) 較新版GraphPad Prism 10上線啦! 模型和示例 | Intermediate Library for PSCAD V5 MAXQDA 定性、定量和混合方法研究軟件
八方資源網(wǎng)提醒您:
1、本信息由八方資源網(wǎng)用戶發(fā)布,八方資源網(wǎng)不介入任何交易過程,請自行甄別其真實(shí)性及合法性;
2、跟進(jìn)信息之前,請仔細(xì)核驗(yàn)對方資質(zhì),所有預(yù)付定金或付款至個人賬戶的行為,均存在詐騙風(fēng)險(xiǎn),請?zhí)岣呔瑁?
    聯(lián)系方式

公司名: 北京天演融智軟件有限公司

聯(lián)系人: 張經(jīng)理

手 機(jī): 18610814366

電 話:

地 址: 北京海淀海淀上地東路35號院1號樓3層1-312318、1-312-319

郵 編:

網(wǎng) 址: turntech88.b2b168.com

    相關(guān)企業(yè)
    商家產(chǎn)品系列
    • 產(chǎn)品推薦
    • 資訊推薦
    關(guān)于八方 | 八方幣 | 招商合作 | 網(wǎng)站地圖 | 免費(fèi)注冊 | 一元廣告 | 友情鏈接 | 聯(lián)系我們 | 八方業(yè)務(wù)| 匯款方式 | 商務(wù)洽談室 | 投訴舉報(bào)
    粵ICP備10089450號-8 - 經(jīng)營許可證編號:粵B2-20130562 軟件企業(yè)認(rèn)定:深R-2013-2017 軟件產(chǎn)品登記:深DGY-2013-3594
    著作權(quán)登記:2013SR134025
    Copyright ? 2004 - 2025 b2b168.com All Rights Reserved