全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
2010 2
2011-11-02
我希望实现某些系数大于0,所有系数相加的和为1.
不知道R里面有哪个package可以实现?

谢谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2011-11-4 05:51:40
Most linear program packages can solve such problems. But it might become very trivial and time-consuming to really make them run in the format of your problem. If your original loss function  is sum of squares or some common convex one, then it won't be too hard to solve manually. Just Lagrange method.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-6-18 12:44:52
施加非线性约束得到受约束回归模型,该模型必需采用非线性最小二乘法(nonlinear least squares)进行估计。
nls(formula, data,control)其中formula和data用法和最小二乘一样,control添加约束。具体如何添加请参考nls()帮助文档
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群