This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| proc iml; | |
| submit/R; | |
| attitude; | |
| endsubmit; | |
| run ImportDataSetFromR("work.attitude","attitude"); | |
| use attitude; | |
| read all into M; /*attitudeを行列化*/ | |
| L = nrow(M); /*Mの行数*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding:utf-8 | |
| import matplotlib.pyplot as plt | |
| from wordcloud import WordCloud | |
| from bs4 import BeautifulSoup | |
| import requests | |
| import MeCab as mc | |
| def mecab_analysis(text): | |
| t = mc.Tagger("-Ochasen") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| proc iml; | |
| submit/R; | |
| airquality; | |
| endsubmit; | |
| run ImportDataSetFromR("work.air","airquality"); | |
| quit; | |
| proc print data=air(obs=30); /*データの確認(変数名など)*/ | |
| run; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| proc iml; | |
| submit/R; | |
| iris; | |
| endsubmit; | |
| run ImportDataSetFromR("work.iris","iris"); | |
| quit; | |
| proc print data=iris(obs=30) /*データの確認(変数名など)*/ | |
| run; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*推定用データ*/ | |
| proc import out = modelsample | |
| datafile = "C:\Users\User\Desktop\三田論\mitaron_conditional_probit1115_suitei.csv" | |
| dbms=csv REPLACE; | |
| getnames=yes; | |
| datarow=2; | |
| run; | |
| proc print data=modelsample(obs=30); | |
| run: | |
| data model(keep=id week year month day /*brand*/ uicp sicp qicp kicp picp price cm sns price_rihanari cm_rihanari sns_rihanari choice chosen demo_icp age sex marry income1 income2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PROC IML; | |
| submit/R; | |
| library(RMeCab); | |
| result <- RMeCabC("私は大学に通っています。"); | |
| result | |
| endsubmit; | |
| run; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ERROR: The RLANG system option must be specified in the SAS configuration file or on the SAS invocation command line | |
| to enable the submission of R language statements. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -config "C:\Program Files\SASHome\SASFoundation\9.4\nls\ja\sasv9.cfg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*自分で設定*/ | |
| -RLANG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| submit/R; | |
| library(RMeCab); | |
| result <- RMeCabC("私は統計学を勉強しています。"); | |
| result | |
| endsubmit; |