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

📄 mf_vec.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 16sep2004}{...}
{cmd:help mata vec()}
{hline}
{* index vec()}{...}
{* index vech()}{...}
{* index invvech()}{...}

{title:Title}

{p 4 8 2}
{bf:[M-5] vec() -- Stack matrix columns}


{title:Syntax}

{p 8 8 2}
{it:transmorphic colvector}{bind: }
{cmd:vec(}{it:transmorphic matrix T}{cmd:)}

{p 8 8 2}
{it:transmorphic colvector}
{cmd:vech(}{it:transmorphic matrix T}{cmd:)}

{p 8 8 2}
{it:transmorphic matrix}
{cmd:invvech(}{it:transmorphic colvector v}{cmd:)}



{title:Description}

{p 4 4 2}
{cmd:vec(}{it:T}{cmd:)} returns {it:T} transformed into a
column vector with one column stacked onto the next.

{p 4 4 2}
{cmd:vech(}{it:T}{cmd:)} returns square and typically symmetric
matrix {it:T} transformed into a column vector; only the lower half of 
the matrix is recorded.

{p 4 4 2}
{cmd:invvech(}{it:v}{cmd:)} returns {cmd:vech()}-style column vector {it:v}
transformed into a symmetric (Hermitian) matrix.



{title:Remarks}

{p 4 4 2}
Remarks are presented under the headings

	{bf:Example of vec()}
	{bf:Example of vech() and invvech()}


{title:Example of vec()}

        {cmd}: x
        {res}       {txt}1   2   3
            {c TLC}{hline 13}{c TRC}
          1 {c |}  {res}1   2   3{txt}  {c |}
          2 {c |}  {res}4   5   6{txt}  {c |}
            {c BLC}{hline 13}{c BRC}

        {cmd}: vec(x)
        {res}       {txt}1
            {c TLC}{hline 5}{c TRC}
          1 {c |}  {res}1{txt}  {c |}
          2 {c |}  {res}4{txt}  {c |}
          3 {c |}  {res}2{txt}  {c |}
          4 {c |}  {res}5{txt}  {c |}
          5 {c |}  {res}3{txt}  {c |}
          6 {c |}  {res}6{txt}  {c |}
            {c BLC}{hline 5}{c BRC}{txt}



{title:Example of vech() and invvech()}

        {cmd}: x
        {res}{txt}[symmetric]
               1   2   3
            {c TLC}{hline 13}{c TRC}
          1 {c |}  {res}1        {txt}  {c |}
          2 {c |}  {res}2   4    {txt}  {c |}
          3 {c |}  {res}3   6   9{txt}  {c |}
            {c BLC}{hline 13}{c BRC}

        {cmd}: v = vech(x)
        {res}
        {cmd}: v
        {res}       {txt}1
            {c TLC}{hline 5}{c TRC}
          1 {c |}  {res}1{txt}  {c |}
          2 {c |}  {res}2{txt}  {c |}
          3 {c |}  {res}3{txt}  {c |}
          4 {c |}  {res}4{txt}  {c |}
          5 {c |}  {res}6{txt}  {c |}
          6 {c |}  {res}9{txt}  {c |}
            {c BLC}{hline 5}{c BRC}

        {cmd}: invvech(v)
        {res}{txt}[symmetric]
               1   2   3
            {c TLC}{hline 13}{c TRC}
          1 {c |}  {res}1        {txt}  {c |}
          2 {c |}  {res}2   4    {txt}  {c |}
          3 {c |}  {res}3   6   9{txt}  {c |}
            {c BLC}{hline 13}{c BRC}{txt}


{title:Conformability}

    {cmd:vec(}{it:T}{cmd:)}:
                  {it:T}:   {it:r x c}
             {it:result}:   ({it:r}*{it:c}) {it:x} 1

    {cmd:vech(}{it:T}{cmd:)}:
                  {it:T}:   {it:n x n}
             {it:result}:   ({it:n}*({it:n}+1)/2) {it:x} 1

    {cmd:invvech(}{it:v}{cmd:)}:
                  {it:v}:   ({it:n}*({it:n}+1)/2) {it:x} 1
             {it:result}:   {it:n x n}


{title:Diagnostics}

{p 4 4 2}
{cmd:vec(}{it:T}{cmd:)} cannot fail.

{p 4 4 2}
{cmd:vech(}{it:T}{cmd:)} aborts with error if {it:T} is not square.
{cmd:vech()} records only the lower triangle of {it:T}; it does not 
require {it:T} be symmetric.

{p 4 4 2}
{cmd:invvech(}{it:v}{cmd:)} aborts with error if {it:v} 
does not have 0, 1, 3, 6, 10, ... rows.


{title:Source code}

{p 4 4 2}
{view vec.mata, adopath asis:vec.mata},
{view vech.mata, adopath asis:vech.mata},
{view invvech.mata, adopath asis:invvech.mata}


{title:Also see}

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

{p 4 13 2}
Online:  help for 
{bf:{help m4_manipulation:[M-4] manipulation}}
{p_end}

⌨️ 快捷键说明

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