similar to: how to extract data from a function printout - example provided

Displaying 20 results from an estimated 500 matches similar to: "how to extract data from a function printout - example provided"

2010 Dec 21
0
"variable lengths differ (found for '(weights)')" error in Zelig library
Dear R users, I am trying to estimate to estimate the average treatmen effect on the treated (ATT) using first the MatchIt software to weight the data set and, after this, the Zelig software as shown in Ho et al. (2007). See here for an explanation of how to apply this technique in R: http://imai.princeton.edu/research/files/matchit.pdf I encounter a slight problem when I apply the weights that
2011 Jan 25
0
Problem with matchit() and zelig()
Dear all, Does anybody know why the following code returns an error message? >library(MatchIt) >library(Zelig) >data(lalonde) > >m.out1<-matchit(treat~age+educ+black+hispan+nodegree+married +re74+re75, method="full", data=lalonde) > >z.out1<-zelig(re78~age+educ+black+hispan+nodegree+married+re74+re75, data=match.data(m.out1, "control"),
2011 Jul 06
0
matching, treatment effect-ATT and Zelig package
Hi there, I'm wondering what Zelig in the following situation (code below) actually does. Is this considered as a so called regression adjustment after the propensity score matching? library(MatchIt) library(Zelig) data(lalonde) re78 represents the outcome variable 1. With Zelig m.out <- matchit(treat ~ age + educ + black + hispan + married + nodegree + re74 + re75, data = lalonde)
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 <-
2011 Jul 16
1
MatchIt Package
Hi there dear R users! Anyone knows why does matchit function returns error whenever the "hull" option is used (either "hull.both", "hull.control" or "hull.treat"). Things work well with all the rest of discard options. This is the error msg. >m.out.base <- matchit(formula=f, data=d, method=m, discard="hull.control") [1]
2012 Jun 05
0
propensity score matching estimates?
I'm using the "Match" package to do propensity score matching. Here's some example code that shows the problem that I'm having (much of this code is taken from the Match package documentation): *data(lalonde) glm1 <- glm(treat~age + I(age^2) + educ + I(educ^2) + black + hisp + married + nodegr + re74 + I(re74^2) + re75 + I(re75^2) + u74 + u75,
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<-
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
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
2013 May 20
1
help with 'cem' for r 2.14.2
Hello, I am trying to use R for propensity score matching in SPSS.? I have version 21 of SPSS and I downloaded R 2.14.2 as directed as well as the R Essentials plug-in.? I have run a test for R and it appears to be running correctly.? I then downloaded psmatching3 and have tried to use the PS matching dialog in SPSS.? However, I continue to run into problems as SPSS reports that there is no
2012 Dec 08
1
imputation in mice
Hello! If I understand this listserve correctly, I can email this address to get help when I am struggling with code. If this is inaccurate, please let me know, and I will unsubscribe. I have been struggling with the same error message for a while, and I can't seem to get past it. Here is the issue: I am using a data set that uses -1:-9 to indicate various kinds of missing data. I changed
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
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]]
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)
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,
2006 Apr 25
1
Daily package check and --install=no
R-devel, There has been some confusion on the MatchIt package mailing list on the meaning of [--install=no] in the comment column of CRAN's automated package check. It's my understanding that, at the very least, a package marked like this will not have its test cases run each night. Are there other checks that are omitted? How, if at all, are such install flags related to the
2018 Oct 21
2
Instalar paquetes antiguos en Windows 10
Hola a todos! Espero que alguien me pueda echar algo de luz al problema que tengo. Estoy intentando instalar algunos paquetes antiguos en R (3.3.0), como ?devtools? en su penúltima versión, y me está resultando imposible. Instalé Rtools y R me dice que funciona, pero no consigo hacer que se instale el paquete. He probado bajando el paquete en formato .tar.gz y luego con las instrucciones:
2006 Jun 18
1
Method for selection bias with multinomial treatment
I have to the treatment effect base on the observational data.And the treatment variable is multinomial rather than binary.Because the treatment assignment is not random,so the selection-bias exists.Under this condition,what's the best way to estimate the treatment effect? I know that if the treatment is binary,I can use propensity score matching using MatchIt package.But what about
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