⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mf_det.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 28mar2005}{...}
{bf:help mata det()}
{hline}
{* index determinant of matrix}{...}
{* index det()}{...}
{* index dettriangular()}{...}

{title:Title}

{p 4 4 2}
{bf:[M-5] det() -- Determinant of matrix}


{title:Syntax}

{p 8 12 2}
{it:numeric scalar} 
{cmd:det(}{it:numeric matrix A}{cmd:)}

{p 8 12 2}
{it:numeric scalar} 
{cmd:dettriangular(}{it:numeric matrix A}{cmd:)}


{title:Description}

{p 4 4 2}
{cmd:det(}{it:A}{cmd:)} returns the determinant of {it:A}.

{p 4 4 2}
{cmd:dettriangular(}{it:A}{cmd:)} returns the determinant of {it:A} 
treating {it:A}, as if it were triangular (even if it is not).


{title:Remarks}

{p 4 4 2}
Calculation of the determinant is made by obtaining the LU decomposition of 
{it:A} and then calculating the determinant of {it:U}:

		det({it:A}) = det({it:PLU})
		       = det({it:P})*det({it:L})*det({it:U})
		       = (+/-1)*1*det({it:U})
		       = +/-det({it:U})

{p 4 4 2}
Since {it:U} is (upper) triangular, det({it:U}) is simply the product of its 
diagonal elements.
See {bf:{help mf_lud:[M-5] lud()}}.


{title:Conformability}

    {cmd:det(}{it:A}{cmd:)}, {cmd:dettriangular(}{it:A}{cmd:)}:
		{it:A}:  {it:n x n}
	   {it:result}:  1 {it:x} 1


{title:Diagnostics}

{p 4 4 2}
    {cmd:det(}{it:A}{cmd:)} and 
    {cmd:dettriangular(}{it:A}{cmd:)} 
    return 1 if {it:A} is 0 {it:x} 0.

{p 4 4 2}
    {cmd:det(}{it:A}{cmd:)} aborts with error if {it:A} is not square
    and returns missing if {it:A} contains missing values.
    
{p 4 4 2}
    {cmd:dettriangular(}{it:A}{cmd:)} aborts with error if {it:A} is not 
    square and returns missing if any element on the diagonal of {it:A} 
    is missing.

{p 4 4 2}
    Both 
    {cmd:det(}{it:A}{cmd:)} and 
    {cmd:dettriangular(}{it:A}{cmd:)} 
    will return missing value if the determinant exceeds 8.99e+307.


{title:Source code}

{p 4 4 2}
{view det.mata, adopath asis:det.mata},
{view dettriangular.mata, adopath asis:dettriangular.mata}
    

{title:Also see}

{p 4 13 2}
Manual:  {hi:[M-5] det()}

{p 4 13 2}
Online:  help for 
{bf:{help mf_lud:[M-5] lud()}};
{bf:{help m4_matrix:[M-4] matrix}}
{p_end}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -