我正在寻找一个模型,我的结果变量是正面和连续的 - 来自Facebook广告的转化次数。
这是一个数据样本。 “Results_Total”是结果变量 -
| Team | Opp_Team | Channel_Market | Week | Thuuz_Rating | Team_EloRating | Opp_Team_EloRating | Divisional | Spend | Results_Total |
+-----------------+----------------------+----------------+------+--------------+----------------+--------------------+------------+---------+---------+
| Atlanta Falcons | Tampa Bay Buccaneers | Fox_In | 1 | 46 | 1486 | 1412 | 1 | 4681.63 | 48 |
+-----------------+----------------------+----------------+------+--------------+----------------+--------------------+------------+---------+---------+
| Atlanta Falcons | Carolina Panthers | Fox_In | 4 | 68 | 1510 | 1604 | 1 | 5373.1 | 45 |
+-----------------+----------------------+----------------+------+--------------+----------------+--------------------+------------+---------+---------+
| Atlanta Falcons | Denver Broncos | Fox_In | 5 | 66 | 1541 | 1690 | 0 | 5339.04 | 15 |
+-----------------+----------------------+----------------+------+--------------+----------------+--------------------+------------+---------+---------+
| Atlanta Falcons | Seattle Seahawks | Fox_In | 6 | 68 | 1576 | 1654 | 0 | 6304.21 | 41 |
我已经安装了AER包并尝试了这段代码:
library(AER)
nfltobit = tobit(Results_Total ~ Team + Opp_Team + Channel_Market + Week + Spend + Team:Spend + Opp_Team:Spend + Channel_Market:Spend + Week:Spend, left = 0 , right = Inf, data = nfltrain)
出于某种原因,我收到了错误:
未使用的参数(左= 0,右= Inf,数据= nfltrain)
也许我没有正确接近这个,或者tobit功能不是正确的方法。有什么想法吗?