Displaying 20 results from an estimated 900 matches similar to: "after PCA, the pc values are so large, wrong?"
2012 Jun 14
0
fixed trimmed mean for j-group
Hello...i want to find the empirical rate for type 1 error using fixed
trimmed mean.  To make it easy, i'm referring to journal given by this
website
http://www.academicjournals.org/ajmcsr/PDF/pdf2011/Yusof%20et%20al.pdf.
I already run the programme and there is no error in it but i got zero for
the empirical rate of type 1 error. The empirical rate for the type 1 error
given in the journal
2012 Jul 07
0
fixed trimmed mean for group
Hello,
I haven't found errors in your code. I implemented the test in the paper 
(the first, fixed symetric mean) and it also gives me zero Type I 
errors, when alpha = 0.05. Try to see the value of min(pv) or to plot 
the histogram of 'pv', hist(pv) and you'll see that there are no 
significant p-values, at that level.
Anyway I'll continue to look at it, but my first
2005 Apr 29
1
na.action
Hi,
 
I had the following code:
  testp <- rcorr(t(datcm1),type = "pearson")
  mat1 <- testp[[1]][,] > 0.6
  mat2 <- testp[[3]][,] < 0.05
  mat3 <- mat1 + mat2
 
The resulting mat3 (smaller version) matrix looks like:
 
 NA   0    0    0  
  0  NA    0   NA 
  0   0   NA    2 
  0   0    2   NA   
 
To get to the number of times a '2' appears in the rows, I was
2010 Oct 14
1
rbind ing matrices and resetting column numbers
Sorry for the verbose example.  I want to row bind two matrices, and all works except I want the column labelled "row" to be sequential in the new matrix, shown as "mat3" here, i.e. needs to be 1:6 and not 1:3 repeated twice.  Any suggestions?
Thanks
J
> colnm1 <- c("row","ti","counti")
> colnm2 <-
2010 Jan 27
1
How to sort data.frame
Dear R heleprs
 
Suppose I have following data
 
Scenarios
combination_names
    series1
   series2
Sc1
MAT2 GAU1
7.26554
8.409778
Sc2
MAT2 GAU2
7.438128
8.130275
Sc3
MAT3 GAU1
8.058422
8.06457
Sc4
MAT1 GAU2
8.179855
8.022071
Sc5
MAT3 GAU2
8.184033
8.191831
Sc6
MAT3 GAU2
7.50312
8.232425
Sc7
MAT1 GAU2
7.603291
8.200993
Sc8
MAT1 GAU1
8.221755
8.380097
Sc9
MAT3 GAU2
7.904908
2010 Mar 02
2
turn character string into unevaluated R object
Hi,
How to turn a character string into an unevaluated R object? I want to load some files in a directory into data matrix R objects. I could do this with read.table and assign (see below). Then, I want to turn the character string representing a file name (the evaluated expression of i) into an unevaluated R object. Basically, I want to create matrices whose names are the same as the related file
2010 Mar 29
2
Need help on matrix manipulation
Dear all,
Ket say I have 3 matrices :
mat1 <- matrix(rnorm(16), 4)
mat2 <- matrix(rnorm(16), 4)
mat3 <- matrix(rnorm(16), 4)
Now I want to merge those three matrices to a single one with dimension
4*3=12 and 4 wherein 
on resulting matrix, row 1,4,7,10 will be row-1,2,3,4 of "mat1", row
2,5,8,11 will be row-1,2,3,4 of "mat2" and row 3,6,8,12 will be row-1,2,3,4
of
2008 Oct 03
2
suggestions for plotting 5000 data points
Dear all,
I have a collection of 5000 entries which represent the evolutionary  
rates of 3 animals.
I would like to show the differences between the rates of all 3  
animals and have tried using the function parallel (from the lattice  
package) and pairs() function.
The parallel function would have been perfect save for the large  
number of data (5000). The pairs() function doesn't show
2013 Feb 01
2
Nested loop and output help
Hello Everyone,
My name is Thomas and I have been using R for one week. I recently found
your site and have been able to search the archives of posts. This has
given me some great information that has allowed me to craft an initial
design to an inquiry I would like to make into the breakdown of McNemar's
test. I have read an intro to R manual and the posting guides and hope I am
not violating
2011 Apr 24
2
random roundoff?
On my CentOS 5 box, in a C++ program that does much arithmetic,
including numerous matrix multiplications, I have a situation in
in which the result depends on the nature of nearby I/O.  Thus,
with all arithmetic done with type double, and where values
are mostly in the range [-1.0e0,+1.0e0]  or nearby, I do:
   cerr << "some stuff" << endl;
   mat3 = matmult(mat1,mat2);
I
2008 Jul 18
0
spreading the risk
This is for ACroske but I can't find his email so I'll just send it to 
the list. Hi ACroske: The code below takes a zeros and ones matrix and 
puts ones
in the places you wanted. It can be made shorter ( maybe ?. i haven't 
thought about that ) but first let me know if that's what you wanted ?
The original matrix is called binary.matrix and the final matrix is 
called tempbinmat.
2009 May 19
3
how to calculate means of matrix elements
useR's,
I have several matrices of size 4x4 that I want to calculate means of their
respective positions with.  For example, consider I have 3 matrices given by
the code:
mat1 <- matrix(sample(1:20,16,replace=T),4,4)
mat2 <- matrix(sample(-5:15,16,replace=T),4,4)
mat3 <- matrix(sample(5:25,16,replace=T),4,4)
The result I want is one matrix of size 4x4 in which position [1,1] is the
2012 Oct 07
1
variances of random effects in coxme
Dear R users,
I'm using the function coxme of the package coxme in order to build Cox
models with complex random effects. Unfortunately, I sometimes get
surprising estimations of the variances of the random effects.
I ran models with different fixed covariates but always with the same 3
random effects defined by the argument
varlist=coxmeMlist(list(mat1,mat2,mat3), rescale = F, pdcheck = F,
2006 Jan 26
1
Help constructing a find_by_sql command
Hello all. I am trying to do the equivalent of:
@componentlogs = Componentlog.find(:all,
:conditions => [ "cl_compname like ?", @criteria ],
:offset => offset,
:limit => items_per_page,
:order => "cl_spr DESC" )
in a find_by_sql statement. I cannot use the build in because the 
adaptor isn''t quite right (OCI8)
When I use it I get the following error
2009 Sep 09
2
Matrix multiplication and random numbers
Dear All
I new to using R and am struggling with some matrix multiplication. 
I have two matrices, one containing random numbers, these are multiplied
together to get another matrix which is different each time. When I put in
another for loop to repeat this process a multiple times the matrices are
all the same. I?m sure there is a way to keep the randomness of the
different matrices but I think
2006 Jul 04
1
[Fwd: formatting using the write statement]
>I have a series of write statements because
>i am writing  to a file
>where the characters strings are the column names of a dataframe
>and the numbers are the elements in a particular row.
>So, a file might look like
>
>AAA  2.1
>BB  3.1
>AHLZ 0.2
>
>and it would be named "rowname".mls.
>
>so, each time i get to a new row, i create a new file and
2011 May 18
4
Loop stopping after 1 iteration
Hi all,
This is a very basic question, but I just can't figure out why R is handling
a loop I'm writing the way it is.
Here is the script I have written:
grid_2_series<-function(gage_handle,data_type,filename)
series_name<-paste(gage_handle,data_type,sep="_")
data_grid<-read.table(file=paste(filename,".txt",sep=""))
2013 Apr 24
2
Distance matrices Combinations
Dear UseRs,
MY PROBLEM IS A SMALL PIECE OF A REAL BIG AND A COMPLICATED PROBLEM. IF I DELIBERATE IN A VERY SIMPLE WAY THEN ALL I 
WANT IS TO PUT ALL THE POSSIBLE COMBINATIONS OF 75 DISTANCE MATRICES (BY TAKING 4 MATRICES, MORE COMMONLY 75C4), in the following equation.
t<-as.matrix((MAT1)^2+(MAT2)^2+(MAT3)^2+(MAT4)^2+,upper=T,diag=T))
Then "1215450" values of "t"(one for
2011 Feb 02
0
How column names/row names are preserved in matrix calculation?
Can somebody tell me that, if I do some arithmetic calculation over 2
matrices then how the column names and row names are preserved? It seems
that, for multiplication, column names and row names of the 2nd matrix are
preserved and for additional, there seems not having any explicit rule:
 
> set.seed(1)
> dat1 <- matrix(rnorm(25), 5); colnames(dat1) = rownames(dat1) =
2010 Dec 16
1
predict.lm with new regressor names
Hi all,
Suppose:
y<-rnorm(100)
x1<-rnorm(100)
lm.yx<-lm(y~x1)
To predict from a new data source, one can use:
# works as expected
dum<-data.frame(x1=rnorm(200))
predict(lm.yx, newdata=dum)
Suppose lm.yx has been run and we have the lm object. And we have a
dataframe that has columns that don't correspond by name to the
original regressors. I very! naively assumed that doing