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

📄 mf_spline3.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 09feb2005}{...}
{cmd:help mata spline3()}
{hline}
{* index spline3()}{...}
{* index spline3eval()}{...}
{* index cubic natural splines}{...}

{title:Title}

{p 4 8 2}
{bf:[M-5] spline3() --  Cubic spline interpolation}


{title:Syntax}

{p 8 12 2}
{it:real matrix}{bind:    }
{cmd:spline3(}{it:real vector x}{cmd:,} 
{it:real vector y}{cmd:)}

{p 8 12 2}
{it:real vector}
{cmd:spline3eval(}{it:real matrix spline_info}{cmd:,}
{it:real vector x}{cmd:)}


{title:Description}

{p 4 4 2}
{cmd:spline3(}{it:x}{cmd:,} {it:y}{cmd:)}
returns the coefficients of a cubic natural spline S({it:x}).
The elements of {it:x} must be strictly monotone increasing.

{p 4 4 2}
{cmd:spline3eval(}{it:spline_info}{cmd:,} {it:x}{cmd:)} 
uses the information returned by {cmd:spline3()}
to evaluate and return the spline at the abscissas {it:x}.  
Elements of the returned result are set to missing if outside the range of the
spline.  {it:x} is assumed to be monotonically increasing.


{title:Remarks}

{p 4 4 2}
{cmd:spline3()} and {cmd:spline3eval()}
is a translation into Mata of 

	Algorithm CUBNATSPLINE, 472-P 5-0
	Collected Algorithms from CACM
	Procedures for Natural Spline Interpolation [E1]
	John G. Herrior, Computer Science Department, Standford Univ.
	Christian H. Reinsch, Mathematisches Institut der Technischen
	Universit{c a:}t, 8 M{c u:}nchen 2, Germany.

{p 4 4 2}
For {it:xx} in [{it:x}[{it:i}], {it:x}[{it:i}+1]):

		S({it:xx}) = (({it:d}[{it:i}]*{it:t} + {it:c}[{it:i}])*{it:t} + {it:b}[{it:i}])*{it:t} + {it:y}[{it:i}]

{p 4 4 2}
with {it:t} = {it:xx} - {it:x}[{it:i}].
{cmd:spline3()} returns 
({it:b}, {it:c}, {it:d}, {it:x}, {it:y})
or, if x and y are row vectors, 
({it:b}, {it:c}, {it:d}, {it:x}{bf:'}, {it:y}{bf:'}).


{title:Conformability}

    {cmd:spline3(}{it:x}{cmd:,} {it:y}{cmd:)}:
		{it:x}:  {it:n x} 1  or  1 {it:x n}
		{it:y}:  {it:n x} 1  or  1 {it:x n}
	   {it:result}:  {it:n x} 5

    {cmd:spline3eval(}{it:spline_info}{cmd:,} {it:x}{cmd:)}:
	     {it:info}:  {it:n x} 5
		{it:x}:  {it:m x} 1  or  1 {it:x m}
	   {it:result}:  {it:m x} 1  or  1 {it:x m}
	

{title:Diagnostics}

{p 4 4 2}
    {cmd:spline3(}{it:x}{cmd:,} {it:y}{cmd:)}
    requires {it:x} be in ascending order.

{p 4 4 2}
    {cmd:spline3eval(}{it:spline_info}{cmd:,} {it:x}{cmd:)}
    requires {it:x} be in ascending order.


{title:Source code}

{p 4 4 2}
{view spline3.mata, adopath asis:spline3.mata},
{view spline3eval.mata, adopath asis:spline3eval.mata}


{title:Also see}

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

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

⌨️ 快捷键说明

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