在 R 中积分非参数曲线
只是警告,我一天前开始使用 R...如果有任何事情看起来非常简单,我深表歉意。
现在,我正在尝试让 R 接收包含撞击加速度计数据的 .txt 文件,并为其计算头部受伤标准测试。 HIC 测试要求将数据曲线按一定间隔进行积分。
该方程位于下面的链接...我尝试将其作为图像插入此处,但它不允许我这样做。显然我需要一些声誉点才能让我这样做。
a(t) 是加速度曲线。
到目前为止,我在 R 中生成合适的曲线来匹配数据还没有遇到问题。 loess 函数运行得很好,这正是我一直在寻找的东西......我只是不知道如何集成它。据我所知,黄土是非参数回归,因此无法确定曲线的方程。有没有办法整合它?
如果没有,是否有另一种方法可以使用不同的函数来完成此任务?
任何帮助或有见地的评论将非常感激。
提前致谢,
韦斯
詹姆斯还有一个问题,在使用Integrate()函数时,我怎样才能得到没有文本和错误的数字?
Just a warning, I started using R a day ago...my apologies if anything seems idiotically simple.
Right now im trying to have R take in a .txt file with acelerometer data of an impact and calculate a Head injury criterion test for it. The HIC test requires that curve from the data be integrated on a certain interval.
The equation is at the link below...i tried to insert it here as an image but it would not let me. Apparently i need some reputation points before it'll let me do that.
a(t) is the aceleration curve.
So far i have not had an issue generating a suitable curve in R to match the data. The loess function worked quite well, and is exactly the kind of thing i was looking for...i just have no idea how to integrate it. As far as i can tell, loess is a non-parametric regression so there is no way to determine the equation of the curve iteslf. Is there a way to integrate it though?
If not, is there another way to acomplish this task using a different function?
Any help or insighful comments would be very much appreciated.
Thanks in advance,
Wes
One more question though James, how can i just get the number without the text and error when using the integrate() function?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在
loess
模型上使用predict
函数来创建与integrate
一起使用的函数。并单独提取值:
You can use the
predict
function on yourloess
model to create a function to use withintegrate
.And to extract the value alone: