你的文件名不符合stata的命令规则,请查看视频中的讲解。
修改如下提示错误信息的变量名称:
. xmluse "C:\Documents and Settings\Lenovo\桌面\panel.xml", clear missing first
(using doctype(excel) for C:\Documents and Settings\Lenovo\桌面\panel.xml)
Size(Ln asset) invalid name
(Size(Ln asset) is invalid variable name; renaming to var15)
(spaces converted to underscores for variable name: Tangibility_Ratio)
然后运行如下命令即可:
xmluse "C:\Documents and Settings\Lenovo\桌面\panel.xml", clear missing first
最为简洁的办法:复制excel 中的数据,直接粘贴到stata中即可(现在stata中执行 edit 命令打开空白表格)。
附件中是处理好的数据。
3YR_AVG_RETURN_ON_ASSETS invalid name
(3YR_AVG_RETURN_ON_ASSETS is invalid variable name; renaming to var24)