Skip to content

Commit

Permalink
Merge pull request #5 from nicholasjclark/development
Browse files Browse the repository at this point in the history
Merging development to master for 1.0.3 release
  • Loading branch information
nicholasjclark authored May 16, 2018
2 parents 2f2eed2 + d4825a6 commit 1c7dde7
Show file tree
Hide file tree
Showing 49 changed files with 3,499 additions and 1,816 deletions.
Binary file modified .DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: MRFcov
Type: Package
Title: Markov Random Fields with additional covariates
Version: 1.0.2
Date/Publication: 2018-01-08
Version: 1.0.3
Date/Publication: 2018-17-05
URL: https://github.com/nicholasjclark/MRFcov
Authors@R: c(
person("Nicholas J", "Clark", email = "[email protected]", role = c("aut", "cre")),
Expand All @@ -13,7 +13,7 @@ Description: Approximate node interaction parameters of undirected Markov Random
graphs. Models can incorporate additional covariates, allowing users to estimate
how interactions between nodes in the graph are predicted to change across
covariate gradients.
Depends: R (>= 3.3.3), penalized
Depends: R (>= 3.3.3), penalized, glmnet
Imports: purrr,
parallel,
plyr,
Expand Down
6 changes: 3 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ export(MRFcov)
export(bootstrap_MRF)
export(comp_rosalia_MRF)
export(countzero)
export(cv_MRF)
export(cv_MRF_diag)
export(getMRF_adjacency_cont)
export(getMRF_adjacency_factor)
export(cv_MRF_diag_rep)
export(plotMRF_hm)
export(plotMRF_hm_cont)
export(plotMRF_hm_factor)
export(plotMRF_net_cont)
export(predict_MRF)
export(predict_MRFnetworks)
export(prep_MRF_covariates)
import(glmnet)
import(penalized)
importFrom(magrittr,"%>%")
importFrom(parallel,clusterEvalQ)
Expand Down
3 changes: 3 additions & 0 deletions R/Bird.parasites.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
#' \item{scale.prop.zos}{scaled numeric variable representing relative abundance
#' of \emph{Zosterops} host species}
#' }
#' @references Clark, N.J., Wells, K., Dimitrov, D. & Clegg, S.M. (2016)
#' Co-infections and environmental conditions drive the distributions of blood
#' parasites in wild birds. Journal of Animal Ecology, 85, 1461-1470.
#' @source \url{http://dx.doi.org/10.5061/dryad.pp6k4}
"Bird.parasites"
2 changes: 2 additions & 0 deletions R/Dipping.survey.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,7 @@
#' \item{dipping_round6}{model matrix variable for the factor \emph{dipping_round}, round 6. The
#' base contrast level for this variable is round 2}
#' }
#' @references Golding, N., Nunn, M.A. & Purse, B.V. (2015) Identifying biotic interactions
#' which drive the spatial distribution of a mosquito community. Parasites & Vectors, 8, 367
#' @source \url{https://doi.org/10.6084/m9.figshare.1420528.v1}
"Dipping.survey"
366 changes: 287 additions & 79 deletions R/MRFcov.R

Large diffs are not rendered by default.

320 changes: 229 additions & 91 deletions R/bootstrap_MRF.R

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions R/comp_rosalia_MRF.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#'@param rosalia_mod A fitted \code{\link[rosalia]{rosalia}} model
#'@return A \code{list} of two objects:
#'\itemize{
#' \item \code{Positive_predictive_value}: The positive predictive value
#' \item \code{Negative_predictive_value}: The negative predictive value
#' \item \code{Positive_interactions}: The positive predictive value
#' \item \code{Negative_interactions}: The negative predictive value
#' }
#'
#'@seealso \code{\link{MRFcov}}, \code{\link[rosalia]{rosalia}}
Expand Down Expand Up @@ -46,6 +46,6 @@ pos.pred <- sum(true.pos, na.rm = TRUE)/

neg.pred <- sum(true.neg, na.rm = TRUE)/
(sum(true.neg, na.rm = TRUE) + sum(missed.neg, na.rm = TRUE))
return(list(Positive_predictive_value = pos.pred,
Negative_predictive_value = neg.pred))
return(list(Positive_interactions = pos.pred,
Negative_interactions = neg.pred))
}
Loading

0 comments on commit 1c7dde7

Please sign in to comment.