Displaying 7 results from an estimated 7 matches for "data_i".
Did you mean:
data_r
2006 Jul 24
5
change the name of file
...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")
}
Of course file name Data_i.txt will be the same for changing i,
unfortunately.
Any suggestion would be appreciate
Robert
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_...
2010 Apr 12
1
lattice garphs: combining multiple scatterplots and adding legend
Dear 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? ~
2010 Nov 06
4
Using changing names in loop in R
...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 several data points
>data <- c(NA,n)
>for (i in 1:n){
>data[i] <- Data_i + Data_[i-1]
> }
I know that the above code doesn't work, and I don't want to combine the
files into one vector to solve the problem etc. - I would just like to know
who make sure R recognizes the extension "_i". I have the same problem for
say, reading in da...
2008 Aug 07
3
Create new dataframes with dames from dataset...
Hi
I'm wondering if you could save new data frames with in a loop using the
names within the data frame... I.e. If you have a data frame as below
Product Type Test
A One 67
A Two 55
B One 42
A One 55
I would like to generate new dataframes as follow...
A.One (including)
A One 67
A One 55
A.Two (including)
A
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(..., weights=W_i,) works very well for the Gaussian design, but if I were to change it to a Binomial design it doesn'...