try removing quotes "" around my.dat
i.e.
data=my.dat
Sent from my StrawBerry®
On 09/mar/2013, at 17:58, "Ruhil, Anirudh" <ruhil(a)ohio.edu> wrote:
Hello All;
I am trying to get a situation of matching for multiple treatments resolved via cem but
ran into an error message with my data. I then switched to a randomly generated data frame
(see below) but still get the error message. Any clues as to the culprit?
set.seed(03092013)
a <- as.factor(c(rep(1,35),rep(2,35), rep(3,30)))
b <- runif(100, min=0, max=100)
my.dat <- data.frame(a, b)
mat <- cem(treatment="a",
data="my.dat")
Error: Data must be a data frame
class(my.dat)
[1] "data.frame"
str(my.dat)
'data.frame': 100
obs. of 2 variables:
$ a: Factor w/ 3 levels "1","2","3": 1 1 1 1 1 1 1 1 1 1
...
$ b: num 20.4 16.7 87 81.1 87.9 ...
many thanks in advance!!
Ani
-
--
cem Mailing List, served by HUIT
Send messages: cem(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/?info=cem
More information on cem:
http://gking.harvard.edu/cem
Cem mailing list
Cem(a)lists.gking.harvard.edu
To unsubscribe from this list or get other information:
https://lists.gking.harvard.edu/mailman/listinfo/cem