Re: [問題] R 兩個問題
1. If you can calulate the inverse function of the cumulative function easily,
then randomly sample U1,...,Un from Uniform distribution and compute values of
the inverse function at U1,...,Un.
Or try gibb's sampling.
2. I think there should be a function for arctan in R.
※ 引述《laba1014 (嘿喲~加油!!!)》之銘言:
: 不好意思有兩個R的問題要請教 :
: 1. 請問若已知某分配的 p.d.f 型態 ,
: 譬如 f(x) =1/a(√π)^(-1) * gamma(m)/gamma(m-1) *(1+ x^2/a^2)^(-m)
: 要怎麼寫程式才能從該分配中進行抽樣本的動作 ?
: 2. 反函數要怎麼寫 ?
: 譬如 已知x 但想知道 tan^(-1)(x) 應該怎麼做 ?
: 希望版上前輩能不吝指教 <(_ _)>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 208.125.17.166
→
07/08 16:39, , 1F
07/08 16:39, 1F
→
07/09 08:13, , 2F
07/09 08:13, 2F
→
07/09 08:21, , 3F
07/09 08:21, 3F
→
07/09 08:23, , 4F
07/09 08:23, 4F
→
07/09 08:24, , 5F
07/09 08:24, 5F
推
07/09 08:29, , 6F
07/09 08:29, 6F
→
07/09 08:30, , 7F
07/09 08:30, 7F
推
07/09 17:25, , 8F
07/09 17:25, 8F
→
07/09 17:26, , 9F
07/09 17:26, 9F
討論串 (同標題文章)