Displaying 4 results from an estimated 4 matches for "numgr".
Did you mean:
numer
2015 Jul 13
2
Crear datos aleatorios con restriciones
...o y
> escuela
>
> #---------------------- Combinaciones de: Escuelas - Grados - Divisiones
> #Generar "n" Escuelas: e1, e2, e3...
> numEs <- 20
> escuelas <- paste("e", 1:numEs, sep="")
>
> #Generar "g" Grados: g1, g2, g3...
> numGr <- 3
> grados <- paste("g", 1:numGr, sep="")
>
> #Generar "c" Divisiones: c1, c2, c3...
> numDi <- 4
> divis <- paste("c", 1:numDi, sep="")
>
>
> #Agrupo Escuelas - Grados
> EsGra <- outer(escuelas, grados,...
2015 Jul 13
2
Crear datos aleatorios con restriciones
Hola,
0. La falta de 'elegancia' hace que sea mas dificil hacer cambios al
codigo. Por ejemplo cambiar n.classrooms <- 4 a n.classrooms <- 20
1. Cuando tengo solo 4 puedo hacer esto:
schoolGrade$A <- Teachers$Teacher.ID[1:cuttoff1]
schoolGrade$B <- Teachers$Teacher.ID[1:cuttoff1]
schoolGrade$C <- Teachers$Teacher.ID[(cuttoff1+1):n.teachers]
schoolGrade$D <-
2012 Apr 26
0
Problem with constrOptim when hitting boundary
...tMat<-sapply(possAlleles,probX) #nMuts x nAlleles
if(is.null(dim(wtMat))){
if(length(x)==1) wtMat<-matrix(wtMat,nrow=1)
else stop("Programming error -- single row wtMat")
}
###Need to convert so in terms of pi[-0]
transMat<-rbind(rep(-1,K),diag(K))
Aid<-A%*%transMat
numGr<-wtMat %*% Aid #N x K matrix
init<-rep(1/(K+1),length=K) #equal distribution; could perhaps choose better init value
getProbFromTheta<-function(theta){
return(c(1-sum(theta),theta))
}
neglik<-function(theta){
probDist<-as.vector(A%*%getProbFromTheta(theta)) #should be a vecto...
2015 Jul 13
2
Crear datos aleatorios con restriciones
...-- Combinaciones de: Escuelas - Grados - Divisiones
>>> #Generar "n" Escuelas: e1, e2, e3...
>>> numEs <- 20
>>> escuelas <- paste("e", 1:numEs, sep="")
>>>
>>> #Generar "g" Grados: g1, g2, g3...
>>> numGr <- 3
>>> grados <- paste("g", 1:numGr, sep="")
>>>
>>> #Generar "c" Divisiones: c1, c2, c3...
>>> numDi <- 4
>>> divis <- paste("c", 1:numDi, sep="")
>>>
>>>
>>> #Ag...