R相当新,所以请耐心等待。
我希望创建一个模型,其中我的结果变量只是正数 - 来自Facebook广告的转化次数。
以下是数据样本:
| 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功能不是正确的方法。我试着到处寻找解决方案,但我担心我有点陷入困境。在此先感谢您的帮助!