日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > windows >内容正文

windows

文章2021_01_05_stata15在mac上的dta编码问题和系统crash

發(fā)布時(shí)間:2023/12/10 windows 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 文章2021_01_05_stata15在mac上的dta编码问题和系统crash 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

stata15

macos 10.15.3

問(wèn)題:無(wú)法unicode中文的dta數(shù)據(jù),unicode invalid option時(shí),出現(xiàn)系統(tǒng)crash

解決: 值標(biāo)簽損壞導(dǎo)致的crash, 區(qū)分標(biāo)簽和內(nèi)容分別轉(zhuǎn)碼。

https://www.statalist.org/forums/forum/general-stata-discussion/general/1488060-stata-15-crashes-when-using-unicode-translate

We have two users reporting the similar issue. Both are caused by the original dataset contains corrupted value label(s). The dataset works fine when the particular value label(s) are not used. But when -unicode translate- or other Stata commands try to use the corrupted value label(s), it will potentially crash Stata.?

To work around it, you may do the following,?
?

Code:

// I use test.dta as an example// first we would like to save all value labels in test.dta to a do-file mylab.do use "test.dta", clear label save _all using mylab, replace// then we drop all value labels from the dataset, and save the new dataset as test2.dta label drop _all save test2.dta, replace// now we can translate test2.dta clear unicode encoding set gb18030 unicode translate "test2.dta", invalid(mark) transutf8// now we translate the mylab.do clear unicode encoding set gb18030 unicode translate mylab.do, invalid(ignore)// now we can re-attach value labels use "test2.dta", clear do mylab.do

Now test2.dta contains translated dataset with fixed value labels, Please email Stata tech support at?tech-support@stata.com?with the dataset attached if the problem persists.

?

# 據(jù)稱,stata14后的數(shù)據(jù)采用了unicode編碼,所以除了上面的crash問(wèn)題,還有低版本和高版本數(shù)據(jù)的轉(zhuǎn)化問(wèn)題,如stata5-12和stata13,stata14及以上之間的轉(zhuǎn)化問(wèn)題。

首先,分析一下文件編碼是必要的,如果確定原始文件的編碼是gb18030,可以set。

gb18030,gb2312,GBK。

cd ...

unicode analyze test.dta

unicode encodinng set gb18030

unicode translate test.dta

https://www.bilibili.com/video/BV1pa4y1j7eF/?spm_id_from=trigger_reload

?

未解決的問(wèn)題:stata中的科學(xué)計(jì)數(shù)數(shù)值轉(zhuǎn)到r中時(shí),會(huì)變成字符。

總結(jié)

以上是生活随笔為你收集整理的文章2021_01_05_stata15在mac上的dta编码问题和系统crash的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。