【发布时间】:2021-04-15 13:15:43
【问题描述】:
我正在尝试根据我给出的各种观察结果来进行计算。
我的数据示例如下所示:
Permno R&D Industry Input
1 202 3
2 414 4
3 458 5
4 333 3
5 294 3
6 378 5
7 459 3
8 69 2
9 364 1
10 332 2
11 112 4
12 279 1
13 417 3
14 454 5
15 362 5
16 271 2
17 252 2
18 486 5
19 92 5
20 99 3
在我的输入变量中,我想例如有以下计算:
If Industry = 1 then R&D / 2
If Industry = 2 then R&D / 2
If Industry = 3 then R&D / 6
If Industry = 4 then R&D / 8
If Industry = 5 then R&D / 12
如何将标准纳入我的计算中?
谢谢!
【问题讨论】: