Displaying 20 results from an estimated 5000 matches similar to: "MatchIt Package"
2011 Jun 26
2
how to extract data from a function printout - example provided
Hi there,
Does anyone know how to extract data from a function that prints out two or more summaries? In the function below (the whole code is provided) we get 5 different tables of data. I would like to split each of these tables in a separate file (while the function itself shouldn't be changed), so that further analysis on each data set could be carried out. Your help is deeply
2010 Apr 11
1
Peculiar behaviour with MatchIt and a function
Folks,
I have a strange situation where:
library(MatchIt)
f <- function(d) {
m <- matchit(treatment ~ lsales + major.industry,
data=d, method="nearest", discard="hull.treat")
treatmentfirms <- match.data(m, group="treat")
list(m=m, treatmentfirms=treatmentfirms)
}
res <- f(ex)
does not work at the match.data() call,
2011 Jul 05
2
sample function with different proportions
Hi there,
I guess this is an easy one, but still:
I would like to randomly sample 0s and 1s but in a way that I end up having for example 70% of 1s and the rest of 0s and not 50:50 as this function does: sample(c(0,1), 100, replace = TRUE)
Any recommendations?
Many thanks!
Ana
[[alternative HTML version deleted]]
2008 Sep 21
1
Calculating interval for conditional/unconditional correlation matrix
Hi there,
Could anyone please help me to understand what should be done in order not to get this error message: Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Here is my code:
determinant<-
function(x){det(matrix(c(1.0,0.2,0.5,0.8,0.2,1.0,0.5,0.6,0.5,0.5,0.5,1.0,x,0.8,0.6,x,1.0),ncol=4,byrow=T))}
matrix<-
2009 Sep 21
1
Three dimensional view of the profiles using 'rgl' package (example of 3 dimensional graphics using rgl package).
Hi there,
Anyone has an idea how to put those two sets of code together so that I can get a 3-dimensional picture that includes points instead of 2 separate pictures which doesnt make that much sense at the end.
#Let's say that these are the data we would like to plot:
A<-c(62,84,53)
B<-c(64,82,55)
C<-c(56,74,41)
D<-c(46,68,38)
E<-c(71,98,72)
data<-rbind(A,B,C,D,E)
2011 Jun 28
1
extracting data
Let's say I have an original data set which is called A and data extracted from this original data set, called B. Based on these A and B data set I would like to get data set C which includes all the remaining data from the data set A after we exclude data of the data set B.
Any idea how to do this?
[[alternative HTML version deleted]]
2005 Jun 15
1
cannot coerce class "matchit" into a data.frame"
Greetings fellow humans,
I am attempting to export a text file after using the MatchIt package to match control with treatment subjects. I attempted to write.table and used the following syntax:
"write.table(social,"shaka.txt",sep=" ",quote=FALSE,row.names=FALSE,col.names= FALSE)"
But received the following error message:
"Error in
2012 Jun 19
2
matchit - can I weight the parameters?
This may be a really obvious question but I just can't figure out how to do it.
I have a small dataset that I am trying to compare to some controls. It is essential that the controls are matched on Cancer Stage (a numerical factor between 1 and 4), and then ideally on Age (integer), Gender (factor), Performance Status(factor).
I'm using matchit to try and do this, but it seems to give
2007 Jul 03
1
MatchIt package on Ubuntu 7.04 (Feisty Fawn)
UseRs,
I tried to install the MatchIt package on Ubuntu 7.04. When loading required dependencies I got the following error message:
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library '/usr/local/lib/R/site-library/optmatch/libs/optmatch.so':
/usr/local/lib/R/site-library/optmatch/libs/optmatch.so: cannot map zero-fill pages: Cannot
2009 May 18
3
Runtime Error! Keep on happening while using amap, anacor and ca pckg
Hi there dear R users,
Does anyone have any idea what the following error means and how to sort
it out?
Runtime Error!
Program: C\Program Files\R\R-2.9.0\bin\Rgui.exe
This application has requested the Runtime to terminate it in an unusual
way. Please contact the application’s support team for more information.
Here is the story:
Running the same code, sometimes the error happens and other
2009 Nov 24
2
convex hull for cluster analysis
Dear R gurus and users,
I seem to have problem finding the right tool for plotting convex hulls over
2D plots, after a cluster analysis. In fact I would like to draw a convex hull
in 2D for a generic group of points. I found a "convhulln", but this doesn't seem
to give me a convex hull. Here is what I do:
> library(mvtnorm)
> Mean <- c(2,1)
> Sigma <-
2007 Sep 07
1
Finding convex hull?
Dear UseRs,
I would like to know which function is the most efficient in finding
convex hull of points in 3(or 2)-dimensional case?
Functions for finding convex hull is the following:
convex.hull (tripack), chull (grDevices), in.chull (sgeostat),
convhulln (geometry), convexhull.xy (spatstat), calcConvexHull
(PBSmapping).
I also would like to know if there is a function that can be used
2007 Mar 24
2
sampling from the unoform distrubuton over a convex hull
Dear list,
Does anyone have a suggestion (or better still) code for sampling from the uniform distribution over the convex hull of a set of points?
Many thanks and best wishes,
Ranjan
2005 Jan 11
0
New package: MatchIt
We would like to announce the release of our software MatchIt, now
available on CRAN. MatchIt implements a variety of matching methods for
causal inference.
Abstract:
MatchIt implements the suggestions of Ho, Imai, King, and Stuart (2004)
for improving parametric statistical models by preprocessing data with
nonparametric matching methods. MatchIt implements a wide range of
sophisticated
2005 Jan 11
0
New package: MatchIt
We would like to announce the release of our software MatchIt, now
available on CRAN. MatchIt implements a variety of matching methods for
causal inference.
Abstract:
MatchIt implements the suggestions of Ho, Imai, King, and Stuart (2004)
for improving parametric statistical models by preprocessing data with
nonparametric matching methods. MatchIt implements a wide range of
sophisticated
2003 Oct 11
1
Simplex "Out of Bounds" Error
I am running the following code (testing the use of the simplex function to
determine if a point is in the convex hull of another set of points or not):
>a <- c(0, 0)
>A3 <-matrix(c(1,2,3,4,1,1), ncol = 2, byrow = T)
>b3 <-c(1.5, 3.5, 1)
>simplex(a = a, A3 = A3, b3 = b3)
and the following error message appears:
Error in simplex1(out1$a[1:(n + m1 + m2)], out1$A[, 1:(n + m1
2009 Dec 04
1
multidimensional point.in.polygon??
Hi,
I seek to identify those points in/outside a multidimensional convex hull
(geometry::convhulln). Any suggestions?
Background just in case I'm going down a really wrong road:
Given an observed data set with one dependent/observed variable (Y) and
multiple (3 to 10) independent/design variables (X1, X2, ...) I want to
increase the number of points by interpolating. I'm using
2001 Sep 22
2
Finding a 3D convex hull in R
Dear List Members,
I'm presently carrying out morphological analysis of a data set of neuronal
structures. These are essentially 3D binary trees. In due course I will be
trying to use discriminant analysis or other methods to classify these
neurons based on morphological variables such as total tree length, segment
number etc.
I would like to calculate a 3D convex hull for a set of X,Y,Z
2020 Oct 09
3
Question about the package "MatchIt"
Hi! I'm trying to perform propensity score matching on survey data and so
for each individual observation I have a statistical weight attached. My
question is: is there a way within the package to consider these weights in
the matching procedure?
Thank you very much.
--
Maria Cristina Maurizio
[[alternative HTML version deleted]]
1999 Aug 30
1
convex hulls
Does anybody know if there are functions to:
1. Define a convex hull on a space with more
than 2 dimensions? chull just works for a plane.
2. Numerically select elements within a given complex
hull.
Thanks!
Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es