Giter VIP home page Giter VIP logo

pcev's People

Contributors

stepanv1 avatar turgeonmaxime avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pcev's Issues

Interaction terms

At the moment, interaction terms need to be included explicitly in the PCEV framework, i.e. covariate needs to include a column corresponding to the multiplication of other variables. Can we do better? I think that would require a reformatting of the front-end, perhaps including a formula-type interface...

documentation of computePCEV

I've recently received questions about the output of computePCEV and I realized that I never explain the different components of an object of class Pcev. It would probably make the most sense to add this directly to the documentation page for computePCEV, since this is the main function of the package.

No permutation

At the moment, setting nperm = 0 works, and it behaves as expected (i.e. the model is fitted and no permutation is performed. However, it triggers an error in the print method. We need to replace the p-value with NA or something.

Adaptive selection of blocks

In my most recent simulations (and also in the SMMR paper), I choose the blocks randomly, which still gives a decent performance. So I thought I could add that option in the package, in two ways:

  1. If index is a single positive integer, this is assumed to be the number of blocks.

  2. If index = "adaptive", then the number of blocks is chosen to be 2*p/n, so that there are about n/2 variables per block.

In boths cases, the variables are assigned to a given block at random.

Error When More Covariates Than Response Variables

Hello. When using the pcev package, I get an error when the number of covariates (q) is larger than the number of response variables (p). As you can see in the output below, the error message I get when calling computePCEV(Y, X) is "Error in weights[, 2:(ncol(pcevObj$X) - 1), drop = FALSE]: subscript out of bounds". Is there a reason why PCEV shouldn't be used when q > p, or is there an error in the package? Thank you.

# Attach pcev package
    library(pcev)
    
    # Define dimensions
    p <- 2 # Number of response variables
    q <- 3 # Number of covariates
    n <- 100 # Number of observations
    
    # Generate response matrix and covariate matrix
    set.seed(10)
    Y <- matrix(rnorm(n * p), nrow = n, ncol = p) # Response variables
    X <- matrix(rnorm(n * q), nrow = n, ncol = q) # Covariates
    
    # Attempt to perform PCEV on Y and X
    pcev_out <- computePCEV(Y, X)
#> Error in weights[, 2:(ncol(pcevObj$X) - 1), drop = FALSE]: subscript out of bounds

Created on 2020-07-06 by the reprex package (v0.3.0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.