Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add variable names to vinecop summary #276

Merged
merged 1 commit into from
Oct 24, 2024
Merged

add variable names to vinecop summary #276

merged 1 commit into from
Oct 24, 2024

Conversation

tnagler
Copy link
Collaborator

@tnagler tnagler commented Jul 25, 2024

> u <- replicate(3, runif(50))
> 
> # no names
> summary(vinecop(u))
# A data.frame: 3 x 11 
 tree edge conditioned conditioning var_types family rotation parameters df tau loglik
    1    1        2, 1                    c,c  indep        0             0   0      0
    1    2        1, 3                    c,c  indep        0             0   0      0
    2    1        2, 3            1       c,c  indep        0             0   0      0
> summary(vine(u))
$margins
# A data.frame: 3 x 6 
 margin name nobs   bw loglik d.f.
      1   V1   50 0.31   -4.7  2.4
      2   V2   50 0.31   -3.8  2.4
      3   V3   50 0.36   -5.8  2.3

$copula
# A data.frame: 3 x 11 
 tree edge conditioned conditioning var_types family rotation parameters df tau loglik
    1    1        2, 1                    c,c  indep        0             0   0      0
    1    2        1, 3                    c,c  indep        0             0   0      0
    2    1        2, 3            1       c,c  indep        0             0   0      0

> 
> # with names
> colnames(u) <- c("x", "y", "z")
> summary(vinecop(u))
# A data.frame: 3 x 11 
 tree edge conditioned conditioning var_types family rotation parameters df tau loglik
    1    1        2, 1                    c,c  indep        0             0   0      0
    1    2        1, 3                    c,c  indep        0             0   0      0
    2    1        2, 3            1       c,c  indep        0             0   0      0

---
1 <-> x,   2 <-> y,   3 <-> z 
> summary(vine(u))
$margins
# A data.frame: 3 x 6 
 margin name nobs   bw loglik d.f.
      1    x   50 0.31   -4.7  2.4
      2    y   50 0.31   -3.8  2.4
      3    z   50 0.36   -5.8  2.3

$copula
# A data.frame: 3 x 11 
 tree edge conditioned conditioning var_types family rotation parameters df tau loglik
    1    1        2, 1                    c,c  indep        0             0   0      0
    1    2        1, 3                    c,c  indep        0             0   0      0
    2    1        2, 3            1       c,c  indep        0             0   0      0

---
1 <-> x,   2 <-> y,   3 <-> z 

@tvatter
Copy link
Collaborator

tvatter commented Aug 12, 2024

Could/should something similar be done for vinecopulib?

@tvatter tvatter merged commit b7f9e6d into dev Oct 24, 2024
6 checks passed
@tvatter tvatter deleted the summary-names branch October 24, 2024 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants