Displaying 5 results from an estimated 5 matches for "ratio1".
Did you mean:
ratio
2004 Sep 01
3
coercing a string naming to a variable name and return value
...nstructed with paste. The problem is following: In a data frame, there are
12 columns whose title vary only by a digit, all other part being equal. I
would like to compute a operation on a subset these variables and parse them
in turn.
the data frame "basin.param" contains columns called ratio1, ratio2,
ratio3...
in each of these ratios I want to retain only values above 0. This could be
put like this
crit<- which(basin.param$ratio1 > 0)
basin.param$ratio1[crit] + basin.param$val[crit]
OK, so what if I want to increment from ratio1 to ratio3 automatically and
return the value of t...
2007 Dec 04
1
Metropolis-Hastings within Gibbs coding error
...;-c(19,20,19,21,19,20,16,19,40,81) # total subject in dose-response experiment
y<-c(19,18,19,14,15,4,0,0,0,2) # success in each trials
dta<-cbind(x,n,y)
dta<-as.data.frame(dta) # creating data frame
proposal.b0 = current.b0 = ratio0 = double(Nsim) # blank vector
proposal.b1 = current.b1 = ratio1 = double(Nsim) # blank vector
index <- 1:Nsim # creating index
a0 <- 10 # initial value (assumed) for tau
b0 <- (.01) # initial value (assumed) for tau
fit <- glm((y/n)~x,family=binomial, weight = n, data=dta) # initial value for beta
parameters <- c("Beta0", "Beta1&q...
2013 Feb 01
2
How does this function print, why is n1 which equals 1 printed as 2?
...lpha/2) - qnorm(1 - power))^2/(mu1 - mu2)^2
n1 <- round(n1)
n2 <- ratio * n1
if (length(alpha) == 1) {
alpha1 <- NULL
}
else {
alpha1 <- alpha
}
if (length(power) == 1) {
power1 <- NULL
}
else {
power1 <- power
}
if (length(ratio) == 1) {
ratio1 <- NULL
}
else {
ratio1 <- ratio
}
table1 <- cbind(mu1, mu2, sd1, sd2, n1, n2, alpha1, power1,
ratio1)
colnames(table1)[colnames(table1) == "alpha1"] <- "alpha"
colnames(table1)[colnames(table1) == "power1"] <- "po...
2015 Feb 02
2
Agregar variables
... 904 470 44 1 904 480 105 1 904 490 36 1 904 500 13
> head (intento2) codigo categoría ratio1 1 904 68.992 1 905 60.263 1 906 53.864 1 907 16.435 1 908 5.076 1 909 5.95...
2015 Jan 27
3
trabajar con todos los elementos de la fila de un data.table
Hola a todos...Auxilio, estoy varado en esto y creo que mi terquedad no me deja avanzar ... terquedad ya que estoy usando la estructura data.table y no logro obtener el resultado. Tengo una DT contiene un DATO y los resultados de la aplicación de una validación (ERR01, ERR2, ERR3) y la concatenación de estos errores en una sola columna. Si tiene error, graba el número del error, si no lo tiene,