楼主: ycx0210
88217 33

[面板数据求助] 运行时出现size: factor variables may not contain noninteger values [推广有奖]

11
lemucuson 发表于 2015-9-17 08:16:22
Stata handles factor (categorical) variables elegantly.
You can prefix a variable with i. to specify indicators for each level (category) of the variable.
You can put a # between two variables to create an interaction–indicators for each combination of the categories of the variables. You can put ## instead to specify a full factorial of the variables—main effects for each variable and an interaction.
If you want to interact a continuous variable with a factor variable, just prefix the continuous variable with c..
You can specify up to eight-way interactions.
已有 1 人评分经验 收起 理由
317792209 + 100 精彩帖子

总评分: 经验 + 100   查看全部评分

12
312qly 学生认证  发表于 2016-11-6 10:59:46
将连续变量前加c.

13
312qly 学生认证  发表于 2016-11-6 11:01:38
frontierman 发表于 2014-8-15 23:22
STATA运行时出现factor variables may not contain noninteger values ,请问楼上的几位,这一问题是如何解 ...
将非整数型变量前加上c.,即c.变量名

14
sinopart 发表于 2017-5-31 10:57:06
xtlsdvc lnstock  lnwgi  lngdp risk1 open year,initial(ah)
Bias correction initialized by Anderson and Hsiao estimator
timevar (year) may not contain missing values when option full is specified
r(451);
我是运行xtlsdvc 报错,麻烦各位指教,多谢

15
sincyc 发表于 2017-11-17 15:42:11
这个是有数值是小数,大概是不符合类别变量的定义吧。

16
jaytsoo 在职认证  发表于 2018-3-3 17:30:23
奇迹努力 发表于 2015-6-23 20:51
大神呀,连续变量加c.
虚拟变量加i.
多谢大神

17
joyhoho2012 发表于 2019-3-8 21:25:34
njallby 发表于 2015-4-7 13:13
前面加个小c
谢谢楼主

18
楚天江南客 学生认证  发表于 2019-6-18 17:31:42
非常感谢!

19
肖桫 发表于 2019-12-19 17:48:56
怎么加啊?

20
梧桐煜 发表于 2020-5-9 23:59:51
同问怎么加

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

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