smappnyu / mediascores Goto Github PK
View Code? Open in Web Editor NEWR-package to estimate media scores from url sharing data
R-package to estimate media scores from url sharing data
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?
Unless I missed it and it's already there ... let me know at your convenience!
Cheers,
Soubhik
rhat
I try to run the sample code and keep receiving the following error. I am using MacOS Catalina
error occurred during calling the sampler; sampling not done
simulate_data
see also #2 )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?
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)
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
only mediascores()
has proper input checks atm
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.
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.
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
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'
)
}
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!
LICENSE
fileA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.