是什么导致了“雅可比矩阵”? SAS 中是单数吗?

发布于 2024-12-13 21:17:40 字数 445 浏览 0 评论 0原文

我有一个简单的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

失而复得 2024-12-20 21:17:40

您要传递给 proc 模型的输入数据集是什么?例如,此代码始终有效:

data a;
 v=100;
run;

proc model data=a;
  cdf('normal',log(V/100)+1) = 0.5;
  bounds V>0;
  solve V / solveprint;
run;
quit;

并给出 V=36.78794 的解

,但是稍微更改输入数据(见下文)将始终给出奇异雅可比矩阵误差。

data a;
 v=0.00001;
run;

proc model data=a;
  cdf('normal',log(V/100)+1) = 0.5;
  bounds V>0;
  solve V / solveprint;
run;
quit;

What input data set are you passing to proc model? For example, this code works consistently:

data a;
 v=100;
run;

proc model data=a;
  cdf('normal',log(V/100)+1) = 0.5;
  bounds V>0;
  solve V / solveprint;
run;
quit;

And gives a solution of V=36.78794

But changing the input data somewhat (see below) will consistently give a singular Jacobian matrix error.

data a;
 v=0.00001;
run;

proc model data=a;
  cdf('normal',log(V/100)+1) = 0.5;
  bounds V>0;
  solve V / solveprint;
run;
quit;
夜空下最亮的亮点 2024-12-20 21:17:40

您要求 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 because log(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 of V 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.")

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文