楼主: 柱柱
3813 3

[数据管理求助] 通过infile 录入固定格式的文本文件数据时,出现无法理解结果:cannot be read as a [推广有奖]

  • 0关注
  • 0粉丝

已卖:1份资源

高中生

22%

还不是VIP/贵宾

-

威望
0
论坛币
25 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
428 点
帖子
12
精华
0
在线时间
24 小时
注册时间
2016-3-11
最后登录
2016-10-19

楼主
柱柱 学生认证  发表于 2016-3-11 10:42:44 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

. infile ge ag hi co dh dr tv sp ne ah ve pa pi re ab aa ld using D:\Data\as
> signment1.txt, clear
'subj' cannot be read as a number for ge[1]
'ge' cannot be read as a number for ag[1]
'ag' cannot be read as a number for hi[1]
'hi' cannot be read as a number for co[1]
'co' cannot be read as a number for dh[1]
'dh' cannot be read as a number for dr[1]
'dr' cannot be read as a number for tv[1]
'tv' cannot be read as a number for sp[1]
'sp' cannot be read as a number for ne[1]
'ne' cannot be read as a number for ah[1]
'ah' cannot be read as a number for ve[1]
've' cannot be read as a number for pa[1]
'pa' cannot be read as a number for pi[1]
'pi' cannot be read as a number for re[1]
're' cannot be read as a number for ab[1]
'ab' cannot be read as a number for aa[1]
'aa' cannot be read as a number for ld[1]
'ld' cannot be read as a number for ge[2]
(eof not at end of obs)
(33 observations read)


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:cannot infile canno file 文本文件 文本文件 cannot number

沙发
柱柱 学生认证  发表于 2016-3-11 10:44:09
这个“变量”cannot be read as a number for “变量”,这个是什么意思呀?求高人指点(本人小白一个,刚刚接触stata)

藤椅
atwcrossover 发表于 2016-5-20 14:50:12
打个  end   就解决了

板凳
xddlovejiao1314 学生认证  发表于 2016-7-28 13:30:35
    是不是数据类型的问题,本来是数值型数据,导入时弄成文本型的去了。可以试试infile str x1 int x3 float x3 using  signment1.txt, clear等命令实证每个变量类型,然后再导入呢。祝好运~

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-1 03:49