是什么导致了“雅可比矩阵”? SAS 中是单数吗?
我有一个简单的 SAS(版本 9.2)程序如下,
proc model;
cdf('normal',log(V/100)+1)=0.5;
bounds V>0;
solve V/solveprint;
run;
它抛出异常,表示雅可比矩阵是奇异的,
The Newton method Jacobian matrix of partial derivatives of the
equations with respect to the variables to be solved is singular.
此错误的可能原因是什么?
更新:我已经稍微简化了问题。当修改为“cdf('normal', X)=0.5”时,它可以正常工作。
Update2:bounds更新为V>0;但异常仍然存在
I have a simple SAS (version 9.2) program as follows,
proc model;
cdf('normal',log(V/100)+1)=0.5;
bounds V>0;
solve V/solveprint;
run;
It throws exception that says jacobian matrix to be singular,
The Newton method Jacobian matrix of partial derivatives of the
equations with respect to the variables to be solved is singular.
What is the possible cause of this error?
Update: I have simplified the problem a bit. When modified to "cdf('normal', X)=0.5", it works without exception.
Update2: bounds is updated to V>0; but exception still there
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您要传递给 proc 模型的输入数据集是什么?例如,此代码始终有效:
并给出
V=36.78794
的解,但是稍微更改输入数据(见下文)将始终给出奇异雅可比矩阵误差。
What input data set are you passing to proc model? For example, this code works consistently:
And gives a solution of
V=36.78794
But changing the input data somewhat (see below) will consistently give a singular Jacobian matrix error.
您要求 SAS 求解一个无解的函数。您要求的是使该等式成立的
V>1000
值。但不存在这样的值,因为log(1000/100+1)
约为 3.3,而平均值为 0、标准差为 1 的正态随机变量在 3.3 时的 CDF 为 0.9995。任何较大的V
值只会使函数更接近 1,而不是接近 0.5,因此您的问题没有答案。通过告诉您偏导数矩阵是奇异的,SAS 只是使用奇特的数学来表达“您的函数没有解决方案”。 (实际上它的意思是,“我已经把你的问题变成了一个等价的最大化问题,而这个问题没有最大值,所以我帮不了你。”)
You are asking SAS to solve a function that has no solution. You are asking for the value of
V>1000
that makes this equation true. But there are no such values becauselog(1000/100+1)
is about 3.3, and the CDF of a Normal random variable with mean 0 and standard deviation 1 evaluated at 3.3 is 0.9995. Any larger value ofV
will just move the function closer to 1, not toward 0.5, so there is no answer to your question.By telling you that the matrix of partial derivatives is singular, SAS is just using fancy math speak for "your function doesn't have a solution". (Really what it's saying is, "I've turned your question into an equivalent maximization problem, and that problem doesn't have a maximum, so I can't help you.")