search for: data_y

Displaying 7 results from an estimated 7 matches for "data_y".

Did you mean: data_r
2006 Jul 24
5
change the name of file
Dear R Users, Is it possible to make file names dependent on a changing variable? For instance. I generate random numbers in a loop and at each iteration I want data to write to file (I do not want to write everything in one file using 'append'): for (i in 1:50){ x<-matrix(runif(100, min=0,max=1),nrow=5,ncol=20) Write(t(x),file="Data_i.txt",ncolumns=5,sep="\t") }
2010 May 18
1
Maximization of quadratic forms
Dear R Help, I am trying to fit a nonlinear model for a mean function $\mu(Data_i, \beta)$ for a fixed covariance matrix where $\beta$ and $\mu$ are low- dimensional. More specifically, for fixed variance-covariance matrices $\Sigma_{z=0}$ and $\Sigma_{z=1}$ (according to a binary covariate $Z $), I am trying to minimize: $\sum_{i=1^n} (Y_i-\mu_(Data_i,\beta))' \Sigma_{z=z_i}^{-1} (Y_i-
2010 Apr 12
1
lattice garphs: combining multiple scatterplots and adding legend
...ar List members, its me again, fighting with lattice graphics. I am trying to plot a world map, add some points on different locations with different colors and add a legend, but did not succeed yet with the legend. Here is my code: library(fields) # Data for demonstration data_x = c(0,50,60) data_y = c(0,0,0) cols???= c(1,2,3) data(world.dat) #print map all=xyplot(world.dat$y? ~ world.dat$x, type=c('l'),col="black",xlab="",ylab="", ???ylim=c(-55,80),xlim=c(-170,175),pch=20,cex=0.2, ???auto.key = list(x=0,y=0,text=c('test1','test2','...
2010 Nov 06
4
Using changing names in loop in R
Hello everybody, I have usually solved this problem by repeating lines of codes instead of a loop, but it's such a waste of time, I thought I should really learn how to do it with loops: What I want to do: Say, I have several data files that differ only in a number, e.g. data points (or vector, or matrix...) Data_1, Data_2, Data_3,... and I want to manipulate them e.g. a simple sum of
2008 Aug 07
3
Create new dataframes with dames from dataset...
...5])) # find all motors for platform 1 sorted for(i in 1: length(Motor)){ row_vector <- which(cleaner_1[,5]==Motor[i]) # find the first motor cleaner_type_1 <- cleaner_1[row_vector,] # store it in cleaner_type_1 Data_x <-cleaner_type_1[9] Data_y <-cleaner_type_1[10] hist(Data_x[,], probability=TRUE, breaks=5, main=data_header[9]) savePlot(filename = paste(c("C:/pow",j,"_",i), collapse="") ,type = "eps") # Save plot with order no i
2010 Apr 13
1
WinBUGS Question
Hi: Is there a way we can set up WINBUGS to run 100 simulated datasets on the same model and output results? Or do we have to call in each dataset at a time and repeat the process 100 times manually? Thanks Anamika [[alternative HTML version deleted]]
2010 Oct 27
1
GLM and Weights
Dear all, I am trying to use the 'glm' package as part of a semiparametric technique that involves weighting a likelihood in various ways, i.e. L(theta;data)=Sum_i=1,..,n (W_i)(log L(theta;data_i)) Where W_i can be a kernel weighting function, or W_i can be an indicator of 'non-missingness' divided by a propensity score. In a Monte Carlo exercise, the option glm(...,