Git Product home page Git Product logo

mediascores's People

Contributors

gregoryeady avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mediascores's Issues

Mediascore outputs for media outlets?

Hi SMAPP team,
Big fan of this paper as a fellow polcomm scholar! I was wondering if you might be able to add the media scores for the outlets in your vignette to the data in this repo, in addition to the MCs?

Screen Shot 2020-07-15 at 8 24 04 PM

Unless I missed it and it's already there ... let me know at your convenience!

Cheers,
Soubhik

Flesh out`mediascores()` function

  • Doesn't have documentation yet (model details should be the same as in simulate_data see also #2 )
  • Maybe flesh out the arguments and argument checking (?)

Note about `.onLoad`

I get the following NOTE from R CMD check:

checking R code for possible problems ... NOTE
  File ‘mediascores/R/zzz.R’:
    .onLoad calls:
      packageStartupMessage("\nmediascores: News-sharing Ideology from Social Media Link Data.\nVersion 0.0.1.9000 (Development Version)\ncopyright (c) 2019, Gregory Eady, New York University\n                    Fridolin Linder, New York University\nFor citation information, type citation(\"mediascores\").\n")
  
  See section ‘Good practice’ in '?.onAttach'.

I checked the relevant section in .onAttach but can't tell what the problem is. @GregoryEady do you get that note too?

equality test are failing

 ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
  1/1 mismatches
  [1] 0.477 - 0.462 == 0.0157
  
  ── 2. Failure: point_est works (@test_mediascores.R#17)  ───────────────────────
  `theta_1_median` not equal to 0.46167.
  1/1 mismatches
  [1] 0.477 - 0.462 == 0.0157
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 2 SKIPPED: 0 FAILED: 2
  1. Failure: mediascores function produced a valid stanfit object (@test_mediascores.R#11) 
  2. Failure: point_est works (@test_mediascores.R#17) 

Set up vignettes

The code that's currently commented out in the end of simulate_dgb.R could go into a vignette, demonstrating that the mode can recover the parameters and explaining the simulation function

Warnings displayed in example data-set

The mediascores package when run on the example data-set gives the following warnings.

Warning messages:
1: The largest R-hat is 1.25, indicating chains have not mixed.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#r-hat 
2: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#bulk-ess 
3: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#tail-ess 

In the vignette, it is mentioned that R-hat is less than 1.1. I get similar warnings on other custom data-sets that I have used. I think I have followed the instructions properly . Could you please help me fix/troubleshoot this issue.

Fill in documentation for all functions

The extended header and the details section in the documentation of simulated_data don't have any info yet. In @param params we reference the details section to explain the model parameters that can be passed for the simulation, so that has to be resolved.

Fill in `mediascore-package.R` documentation

Example:

#' NetworkInference: Inferring latent diffusion networks
#' 
#' This package provides an R implementation of the \code{netinf} algorithm 
#' created by Gomez Rodriguez, Leskovec, and  Krause (2010). Given a set of
#' events that spread between a set of nodes the algorithm infers the most likely
#' stable diffusion network that is underlying the diffusion process.
#' 
#' The package provides three groups of functions: 1) data preparation 
#' 2) estimation and 3) interpretation.
#' 
#' @section Data preparation:
#' 
#' The core estimation function \code{\link{netinf}} requires an object of class 
#' \code{cascade} (see \link{as_cascade_long} and \link{as_cascade_wide}). 
#' Cascade data contains information on the potential nodes in the network as 
#' well as on event times for each node in each cascade. 
#' 
#' @section Estimation:
#' 
#' Diffusion networks are estimated using the \code{\link{netinf}} function. It 
#' produces a diffusion network in form of an edgelist (of class 
#' \code{\link{data.frame}}).
#' 
#' @section Interpretation and Visualization:
#' 
#' Cascade data can be visualized with the \code{plot} method of the \code{cascade}
#' class (\code{diffnet, \link{plot.cascade}}). Results of the estimation process can 
#' be visualized using the plotting method of the \code{diffnet} class. 
#' 
#' @section Performance:
#' 
#' If higher performance is required and for very large data sets, a faster pure C++ 
#' implementation is available in the Stanford Network Analysis Project (SNAP). 
#' The software can be downloaded at \url{http://snap.stanford.edu/netinf/}.
#' 
#' @useDynLib NetworkInference, .registration = TRUE
#' @importFrom Rcpp sourceCpp
#' @name NetworkInference
NULL

Startup message in zzz.R

example:

.onAttach <- function(...) {
      packageStartupMessage(
'NetworkInference: Inferring latent diffusion networks.
Version 1.2.3.9000 (Development Version)
copyright (c) 2016, Fridolin Linder, Pennsylvania State University
                    Bruce Desmarais, Pennsylvania State University
For citation information, type citation("NetworkInference").
Type help("NetworkInference") to get started.\n'
      )
  }

Alignment of domains

I understand I can use colnames(MOC115[, 7:151]) to see a list of domains used to the estimation, I was wondering how can see the alignment of these reference domains? (how left or right these domains are assumed,

Thank you!

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.