search for: observarion

Displaying 3 results from an estimated 3 matches for "observarion".

Did you mean: observacion
2011 Jan 17
1
Problem about for loop
Hi everyones, my function like; e <- rnorm(n=50, mean=0, sd=sqrt(0.5625)) x0 <- c(rep(1,50)) x1 <- rnorm(n=50,mean=2,sd=1) x2 <- rnorm(n=50,mean=2,sd=1) x3 <- rnorm(n=50,mean=2,sd=1) x4 <- rnorm(n=50,mean=2,sd=1) y <- 1+ 2*x1+4*x2+3*x3+2*x4+e x2[1] = 10 #influential observarion y[1] = 10 #influential observarion data.x <- matrix(c(x0,x1,x2,x3,x4),ncol=5) data.y <- matrix(y,ncol=1) data.k <- cbind(data.x,data.y) dataX <- data.k[,1:5] dataY <- data.k[,6] theta <- function(data) { B.cap <- solve(crossprod(dataX)) %*% crossprod(dataX,dataY) P <...
2011 Mar 20
2
Why unique(sample) decreases the performance ?
...nts than full sample. Code as follows; e <- rnorm(n=50, mean=0, sd=sqrt(0.5625)) x0 <- c(rep(1,50)) x1 <- rnorm(n=50,mean=2,sd=1) x2 <- rnorm(n=50,mean=2,sd=1) x3 <- rnorm(n=50,mean=2,sd=1) x4 <- rnorm(n=50,mean=2,sd=1) y <- 1+ 2*x1+4*x2+3*x3+2*x4+e x2[1] = 10 #influential observarion y[1] = 10 #influential observarion X <- matrix(c(x0,x1,x2,x3,x4),ncol=5) Y <- matrix(y,ncol=1) Design.data <- cbind(X, Y) for (j in 1:nrow(X)) { result <- vector("list", ) for( i in 1: 3100) { data <- Design.data[sample(50,50,replace=TRUE),] ##### and unique(Desi...
2010 Apr 08
0
selected observations based several variables
...o need to consider the values of "prior". The rough ideas are as follows. # Check whether there are observations which have same x and y values,e.g.1 and 3. If same, their date difference need to be checked further. If their date difference is <=8days, we only need to keep the earliest observarion; #During this selection, variable of "prior" is also needed to be considered. For "prior", the priority is C>A>N. For the same several observations, if the earliest observation has a value of "N" and other later observations have "A" or "C", t...