I want to get the relative frequency of cases in a data frame that
matches a specified criteria, omiting NA values. This seem so simple,
but I can't come up with an effective way.
nrow(data[data$variable>value & !is.na(data$variable),])/nrow(data)
works but is very ineffective and CPU consuming w
Hello helpers,
This is probably quite simple, but I'm stuck.
I want to create a summary statistics table with frequencies and summary
statistics for a large number of variables. The problem here is that (1)
there are two different classes of categories (sex, type of substance abuse
and type of t
I seem to have solved this on my own:
t.score.table <- data.frame(T=10:90,F=pnorm(10:90,mean=50.5,sd=10))
t.score <- function(x) {
p <- ecdf(x)
t <- cut(p(x),breaks=c(t.score.table$F,Inf),labels=t.score.table$T)
t <- as.numeric(levels(t))[as.integer(t)]
return(t)
}
/S
20
I'm looking for a function or algorithm for calculating McCall's area
transformed T-scores, but have not find any. An algorithm is described
on http://www.visualstatistics.net/Visual Statistics
Multimedia/normalization.htm, but this seem to be an overly
complicated procedure for implementing in R.
4 matches
Mail list logo