Displaying 20 results from an estimated 300 matches similar to: "Error in Genetic Matching"
2011 Dec 02
0
Error message in Genetic Matching
Dear R Users,
I am a novice learner of R software. I am working with Genetic Matching - GenMatch(), but I am getting an Error message as follows:
Error in GenMatch(Tr = Tr, X = X.binarynp, BalanceMatrix = BalanceMatrix.binarynp, :
GenMatch(): input includes NAs
Could you please suggest me correcting the above problem?
My GenMatch command is,
> gen1 <- GenMatch(Tr = Tr, X =
2013 Apr 19
5
how to subtotal by rows
Dear R-users,
I have a dataset as like below, and I want to subtotal the values of rice,wheat and maize by year for each fid.
fid year rice wheat maize
------------------------------------------------
1 1995 5 NA NA
1 1995 NA 3 NA
1 1995 NA NA 2
1 1996 4 NA NA
1
2013 Apr 20
2
creating dummy variables
Hello R-users,
The below is a snippet of my data:
fid crop year value
5_1_1 SWHE 1995 171
5_1_1 SWHE 1997 696
5_1_1 BARL 1996 114
5_1_1 BARL 1997 344
5_2_2 SWHE 1995 120
5_2_2 SWHE 1996 511
5_2_2 BARL 1996 239
5_2_2 BARL 1997 349
Here, I want to create dummy variables with the names of the content of a column 'crop' in a way
2012 Jul 15
1
how to extract p-value in GenMatch function
Dear R-Users,
I have a problem on extracting T-Stat and P-Value. I have written R-code below
library("Matching")
data("lalonde")
attach(lalonde)
names(lalonde)
Y <- lalonde$re78
Tr <- lalonde$treat
glm1 <- glm(Tr~age+educ+black+hisp+married+nodegr+re74+re75,family=binomial,data=lalonde)
pscore.predicted <- predict(glm1)
rr1 <-
2010 Mar 11
2
Comparing matrices
Hello all,
I have two matrices, pop and pop2, each the same number of rows and
columns that I want to compare for equality. I am concerned about
efficiency in this operation.
I've tried a few things without success so far. Doing something simple like:
if (pop==pop2) { cat('equal') } else { cat('NOT equal') }
results in the warning:
1: In if (pop == pop2) { :
the
2009 Apr 26
3
3 questions regarding matrix copy/shuffle/compares
Hello all,
I have the following function call to create a matrix of POP_SIZE rows
and fill it with bit strings of size LEN:
pop=create_pop_2(POP_SIZE, LEN)
I have 3 questions:
(1) If I did
keep_pop[1:POP_SIZE] == pop[1:POP_SIZE]
to keep a copy of the original data structure before manipulating
'pop' potentially, would this make a deep copy or just shallow? Ie
2007 Nov 15
3
Ancova doesn't return test statistics
Dear all,
I'm quite sure that this is a stupid question, but I'll ask anyway.
I want to perform an ANCOVA with two continuous factors and three
categorical factors.
Plant population growth rate (GR) = dependent variable
Seed reduction due to herbivory (SR) = continuous explanatory variable
Herbivore species (HS, 2 levels) = categorical explanatory variable
Population (Pop, 24 levels) =
2010 Jan 17
2
For loops in R
Hello.
I've just started using R and am trying to figure out if the two codes
snippets below have the same output
gBest<-floor(runif(popsize,min=1,max=top))
velocity[i,j]<<-.4* velocity[i,j] + 1 * runif(1) * (pbestsVar[i,j] -
popVar[i,j]) + 1 * runif(1) * (archiveVar[gBest,j] - popVar[i,j])
and
for (i in 1:popsize) {
for (j in 1:maxvar) {
gBest<-sample(top,size=1)
2015 Sep 09
0
sample.int() algorithms
I was experiencing a strange pattern of slowdowns when using
sample.int(), where sampling from a one population would sometimes
take 1000x longer than taking the same number of samples from a
slightly larger population. For my application, this resulted in a
runtime of several hours rather than a few seconds. Looking into it,
I saw that sample.int() is hardcoded to switch algorithms when the
2009 Jun 15
4
reading Excel file
Dear all,
I was using older version of R (installed early). I install new version of R (R.2.9.0) but i could not find package "xlsReadWrite" to read Excel file. Is there any alternatives to read Excel file ?
I hope it should be.
I need help although it is minor querry.
Thanks in advance.
Sincerely,
Ram Kumar Basnet
Wageningen University,
The Netherlands
[[alternative HTML
2011 Nov 16
2
Conversion of symmetry matrix into a vector
Dear R users,
I am not good in R-language programming. So, i need your help.
I want to convert my lower-triangle value of symmetry matrix into a vector with their row and column name.
I found a function called "sm2vec" in "corpcor" package but it give only a vector of values but not row and column names. But i also want ROW and COLUMN name together with their corresponding
2008 Sep 05
2
Error: can not allocate vector of 117.3 Mb
Hi R users,
I am doing multiscale bootstrapping for clustering through pvclust package. I have large data set (observations 182 and variables 5546). When i tried to make bootstrapping, then i got message as "Bootstrap (r = 0.5)............Error: cannot allocate vector of size 117.3 Mb".
I am new R user and could not understand what is the problem and also don't know the easiet
2008 Oct 27
3
Problem in installation of "Rgraphviz" package
Dear R users,
I am not so used to this R software. I have to use the package " Rgraphviz" but found some problem in the installation process. I download this package and store in R library but i am not getting this package in R installation list.
I made review in google search net and use the following command:
###
source("http://bioconductor.org/biocLite.R")
2010 Dec 05
3
merging two vectors
Dear R users,
It may be very simple but it is being difficult for me.
I have two vectors with some common string. And, i want to combine into a vector in such a way that it includes string from both vectors and make a unique.
For example:
x <- paste(rep("A",5),1:5,sep = ".")
x
[1] "A.1" "A.2" "A.3" "A.4" "A.5"
y <-
2008 Dec 06
2
Barplot label
Dear all,
I am trying to make barplot from matrix with "beside=FALSE". I have 165 labels in my bar plot. When i plot the label horizontally below the barplot, then all labels are not appear in the plot due to lack of space. I used the following function:
barplot(t(bar), main="Barplot based on LCMS", ylab="RF membership Probability",
2009 Nov 27
2
matching and extracting data
Dear all,
I have querry on how to extract the data by matching between two data set where one has the same elements multiple times?
For example, I have two matrix X and Y.
> X
[,1] [,2] [,3]
1 A 5 P
2 B 6 P
3 C 7 P
4 D 5 Q
5 E 6 Q
6 F 7 Q
7 G 5 R
8 H 6 R
9 I 7
2008 Sep 15
1
how to plot PC2 vs PC 3 in PCA
Hi everybody,
I am doing principal component analysis (PCA) using "prcomp' function. When i did "Biplot", i did not found interesting result and it is based on Principal component (PC) 1 vs PC2. Now, i want to see"Biplot" in combination of either PC1 vs PC3 or PC2 vs PC 3. I did not get the ideas.
Does any one have ideas ?
I am optimistic on getting some idea.
2007 Oct 01
1
saving and loading complex objects
Dear Sir:
When I try to save large and very complex recursive objects with some components containing models (such as the output from arima or lm ),
the resulting file sizes increase by 4 meg per save.
example directory:
amex 8 meg
argentina 12 meg
australia 16 meg
...
Moreover, I am unable to read these file objects back into R.
I note that readBin and writeBin
2009 Nov 25
4
Importing many files from a single code
Dear R users,
Does somebody know the way to import many files by a single command in R ? I have 50 files in a directory and now, i am importing the files repeatedly (one by one). If there is a way to import all files at a time, it makes much more easy and save times too.
Thanks in advance.
Sincerely,
Ram Kumar Basent
Wageningen University,
the Netherlands
[[alternative HTML
2008 Oct 01
1
Error: cannot allocate vector of size 117.3 Mb
Dear R users,
I am using RandomForest package. While using this package, i got
"Error: cannot allocate vector of size 117.3 Mb" .........................message.
I had this problem earlier too but could not manage. Is there any way to solve this problem or to increase vector size ? My data set is of 163 samples and 5546 variables.
I tried through "? Memory" function to solve