全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
1128 1
2021-02-26
================================
基础 copula 的使用
================================




虽然很多年前也通过R 软件,绘制了不同的图。 过去了五六年,新的程序绘制的图和多年以前绘制的图非常的不一样,不过感觉使用更方便,更强大。


粘贴几张图。


======================================================
Markov Switching Model

       AIC     BIC    logLik
  637.0736 693.479 -312.5368

Coefficients:

Regime 1
---------
               Estimate Std. Error t value  Pr(>|t|)   
(Intercept)(S)   0.8417     0.3026  2.7816  0.005409 **
x(S)            -0.0533     0.1347 -0.3957  0.692326   
y_1(S)           0.9208     0.0306 30.0915 < 2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.5034675
Multiple R-squared: 0.8375

Standardized Residuals:
          Min            Q1           Med            Q3           Max
-1.5153667482 -0.0906543177  0.0001873641  0.1656717258  1.2020898976

Regime 2
---------
               Estimate Std. Error t value  Pr(>|t|)   
(Intercept)(S)   8.6393     0.7254 11.9097 < 2.2e-16 ***
x(S)             1.8771     0.3107  6.0415 1.527e-09 ***
y_1(S)          -0.0569     0.0798 -0.7130    0.4758   
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.9339683
Multiple R-squared: 0.2408

Standardized Residuals:
        Min          Q1         Med          Q3         Max
-2.31102193 -0.03317755  0.01034138  0.04509104  2.85245597

Transition probabilities:
           Regime 1   Regime 2
Regime 1 0.98499729 0.02290884
Regime 2 0.01500271 0.97709116


=======================================================

copula 对数似然函数图:


图1001.png


图1000.png

其他图:

图105.png 图104.png 图103.png 图102.png 图101.png

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2021-2-26 14:25:21
复制代码


======================================

> ## Does the Gumbel family seem to be a good choice (statistic "Sn")?
> gofCopula(gumbelCopula(), x)
========Warning in fitCopula.ml(copula, u = data, method = method, start = start,  :
  possible convergence problem: optim() gave code=52
=====Warning in fitCopula.ml(copula, u = data, method = method, start = start,  :
  possible convergence problem: optim() gave code=52
======================Warning in fitCopula.ml(copula, u = data, method = method, start = start,  :
  possible convergence problem: optim() gave code=52
==============================================================

        Parametric bootstrap-based goodness-of-fit test of Gumbel copula, dim. d = 2, with
        'method'="Sn", 'estim.method'="mpl":

data:  x
statistic = 0.244, parameter = 2.09, p-value = 5e-04

> ## With "SnC", really s..l..o..w.. --- with "SnB", *EVEN* slower
> gofCopula(gumbelCopula(), x, method = "SnC", trafo.method = "cCopula")
==============================================================================================Warning in fitCopula.ml(copula, u = data, method = method, start = start,  :
  possible convergence problem: optim() gave code=52
===

        Parametric bootstrap-based goodness-of-fit test of Gumbel copula, dim. d = 2, with
        'method'="SnC", 'estim.method'="mpl", 'trafo.method'="cCopula":

data:  x
statistic = 0.565, parameter = 2.09, p-value = 5e-04

> ## What about the Clayton family?
> gofCopula(claytonCopula(), x)
=================================================================================================

        Parametric bootstrap-based goodness-of-fit test of Clayton copula, dim. d = 2, with
        'method'="Sn", 'estim.method'="mpl":

data:  x
statistic = 0.0163, parameter = 3.24, p-value = 0.44

>
> ## Similar with a different estimation method
> gofCopula(gumbelCopula (), x, estim.method="itau")
=================================================================================================

        Parametric bootstrap-based goodness-of-fit test of Gumbel copula, dim. d = 2, with
        'method'="Sn", 'estim.method'="itau":

data:  x
statistic = 0.163, parameter = 2.58, p-value = 5e-04

> gofCopula(claytonCopula(), x, estim.method="itau")
=================================================================================================

        Parametric bootstrap-based goodness-of-fit test of Clayton copula, dim. d = 2, with
        'method'="Sn", 'estim.method'="itau":

data:  x
statistic = 0.0169, parameter = 3.17, p-value = 0.31

>
>
> ## A three-dimensional example  ------------------------------------
> x <- rCopula(200, tCopula(c(0.5, 0.6, 0.7), dim = 3, dispstr = "un"))
>
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群