Skip to content

Commit

Permalink
na.rm set to TRUE in norm score SE
Browse files Browse the repository at this point in the history
  • Loading branch information
WLenhard committed Jan 5, 2021
1 parent 9fb67c6 commit 515eb3c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: cNORM
Type: Package
Title: Continuous Norming
Version: 2.0.2
Version: 2.0.1
Maintainer: Wolfgang Lenhard <wolfgang.lenhard@uni-wuerzburg.de>
Date: 2021-01-05
Authors@R: c(person("Wolfgang", "Lenhard", role = c("cre","aut"), email="wolfgang.lenhard@uni-wuerzburg.de", comment=c("<https://orcid.org/0000-0002-8184-6889>")), person("Alexandra", "Lenhard", role=c("aut")), person("Sebastian", "Gary", role=c("aut")))
Expand Down
5 changes: 2 additions & 3 deletions R/modelling.R
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ cnorm.cv <- function(data, formula = NULL, repetitions = 5, norms = TRUE, min =
r2.train[i] <- r2.train[i] + (cor(train$normValue, train$T, use = "pairwise.complete.obs")^2)
r2.test[i] <- r2.test[i] + (cor(test$normValue, test$T, use = "pairwise.complete.obs")^2)
norm.rmse[i] <- norm.rmse[i] + sqrt(mean((test$T - test$normValue)^2, na.rm = TRUE))
norm.se[i] <- norm.se[i] + sum(sqrt((test$T - test$normValue)^2))/(length(!is.na(test$T))-2)
norm.se[i] <- norm.se[i] + sum(sqrt((test$T - test$normValue)^2), na.rm = TRUE)/(length(!is.na(test$T))-2)
}
}
}
Expand Down Expand Up @@ -1100,8 +1100,7 @@ cnorm.cv <- function(data, formula = NULL, repetitions = 5, norms = TRUE, min =
d$fitted <- predictNorm(raw, age, model, minNorm = minNorm, maxNorm = maxNorm, covariate = covariate)

d$diff <- d$fitted - data$normValue
d <- d[!is.na(d$fitted), ]
d <- d[!is.na(d$diff), ]

return(sum(sqrt(d$diff^2))/(nrow(d)-2))
return(sum(sqrt(d$diff^2))/(nrow(d)-2), na.rm = TRUE)
}
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is a minor release of an existing package. In this version I have:
* R-hub Fedora Linux, R-devel, clang, gfortran

## R CMD check results
There were no ERRORs or WARNINGs, but NOTES on potentially outdated links in data descriptions. These are all false positives. In the first submission, I had wrongly used 2020 as the year. The error is corrected.
There were no ERRORs or WARNINGs, but NOTES on potentially outdated links in data descriptions and a problem with the date in description. The notes on links all false positives. In the first submission, I had wrongly used 2020 as the year. The error is corrected, but the note still shows up on rhub.

## Downstream dependencies
There are currently no downstream dependencies for this package.

0 comments on commit 515eb3c

Please sign in to comment.