GithubHelp home page GithubHelp logo

xiaoruizhu / passo Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 0.0 40.24 MB

An implementation of the unified framework for assessing Partial Association between ordinal variables after adjusting for a set of covariates (Dungang Liu, Shaobo Li, Yan Yu and Irini Moustaki (2020), accepted by the Journal of the American Statistical Association). This package provides a set of tools to quantify, visualize, and test partial associations between multiple ordinal variables.

Home Page: https://xiaorui.site/PAsso/

R 99.57% C++ 0.43%
partial-association ordinal-variables rpackage statistics association-analysis

passo's People

Contributors

xiaoruizhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

passo's Issues

Release PAsso 0.1.11

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • rhub::check_for_cran()
  • rhub::check(platform = 'ubuntu-rchk')
  • rhub::check_with_sanitizers()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • git push
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • git push

Issue when output = "covariate" for diagnostic.plot()

data("ANES2016")
# Partial association between "PreVote.num" and "PID" after adjusting "income.num", "age", "edu.year"
# "PAsso" function: Only need input responses, adjustments, data
PAsso_1 <- PAsso(responses = c("PreVote.num", "PID"),
adjustments = c("income.num", "age", "edu.year"),
data = ANES2016,
uni.model = "probit",
method = c("kendall"))
diagnostic.plot(object = PAsso_1, output = "covariate", x_name = "income.num", model_id = 2)

Error in assign(x = x_name, object$data[, x_name]) : invalid first argument

Install issue on macOS Mojave with R 3.6.3

As a maintainer, I test PAsso v0.1.8 on my macOS Mojave 10.14.5 with R 3.6.3. It throws issue when install:

fatal error: 'math.h' file not found

Then, the solution will be:

install.packages("https://cran.r-project.org/bin/macosx/el-capitan/contrib/3.6/PAsso_0.1.8.tgz", repos = NULL, type = "source")

However, on my end, another error comes:

there is no package called 'gsl'

Then, use binary installation of gsl package will solve the problem.

install.packages("gsl", type = "mac.binary")

diagnostic.plot() for adjacent category logit model

phi2 <- PAsso(responses = c("PID", "selfLR", "TrumpLR", "ClinLR"), adjustments = c("age", "edu.year", "income.num"), data = ANES2016, method = "kendall", model = c("acat", "acat", "acat", "acat"))
diagnostic.plot(phi2, output = "fitted")

The residuals are supposed to be in U(0,1) scale under acat model, but the plot shows different scale.

residuals()

Am I too annoying? hahaha~

a1<- residuals(fit.PID1, jitter="latent",jitter.uniform.scale="response")
a2<- residuals(fit.PID1, jitter="uniform",jitter.uniform.scale="response")
a3<- residuals(fit.PID1, jitter="latent",jitter.uniform.scale="probability")
a4<- residuals(fit.PID1, jitter="uniform",jitter.uniform.scale="probability")
hist(a1)
hist(a2)
hist(a3)
hist(a4)

a4 does not work. a1 and a3 seem to be the same thing, but what is a2???

residuals()

data("ANES2016")
fit.PID1<- polr(as.factor(PID)~age+edu.year+income.num, data=ANES2016, method="probit")
fit.PID2<- vglm(as.numeric(PID)~age+edu.year+income.num, data=ANES2016, family=acat(reverse=TRUE, parallel=TRUE))
r1<- residuals(fit.PID2, jitter="uniform",jitter.uniform.scale="response", nsim=30)
r2<- residuals(fit.PID2, jitter="uniform",jitter.uniform.scale="probability", nsim=30)
attr(r1,"draws")[,1]

the use of attr() is extremely inconvenient to get a simple output. Suggest to use more traditional way, e.g., r1[,1]
5th line, r2<-... does not work even if fit.PID2 is adjacent category logit model...

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.