[R] Error in inherits(x, "data.frame") : object "Dataset" not found
Bob Green
bgreen at dyson.brisnet.org.au
Tue Jun 6 13:52:11 CEST 2006
I have been trying to run a logistic regression using a number of studies.
Below is the syntax, error message & data.
Any advice regarding what I am doing wrong or solutions are appreciated,
regards
Bob Green
> logreg <- read.csv("c:\\logregtest.csv",header=T)
> attach(logreg)
> names(logreg)
[1] "medyear" "where" "who" "dxbroad" "firstep" "standard"
[7] "age" "sex" "successes" "failures"
> model <- glm(cbind(successes, failures) ~medyear + age + sex + where +
who + dxbroad + firstep + standard, family=binomial, data=Dataset)
Error in inherits(x, "data.frame") : object "Dataset" not found
medyear where who dxbroad firstep standard age sex successes failures
89 3 2 1 0 0 31.5 71 28 117
98 2 2 1 0 1 48 62 15 72
98 4 1 1 0 0 45.2 61 42 57
89 3 0 1 0 1 28.7 63 19 48
99 2 2 1 0 1 34.7 73 27 73
88 3 0 1 0 1 30.6 58 26 57
94 1 1 1 0 1 36.3 81 70 124
96 3 1 1 0 1 40 57 27 40
96 2 2 1 0 1 33.1 64 9 41
88 2 0 1 1 0 29.5 47 30 202
98 1 2 0 0 1 39.3 60 246 734
97 4 0 0 0 1 38.4 67 17 85
92 3 0 1 0 1 34.3 67 15 127
88 2 0 1 0 1 NA 46 9 90
85 3 0 1 0 1 30.3 64 58 87
94 3 0 1 0 1 38.8 47 47 126
88 3 0 1 0 1 33.8 54 25 134
92 3 0 1 1 1 NA NA 67 157
90 3 0 1 1 1 26 52 17 101
90 3 0 1 0 0 NA NA 39 32
90 2 0 1 0 1 36.1 38 10 173
90 2 0 1 0 1 38.9 53 64 383
97 2 0 1 0 1 31.5 61 12 52
99 1 1 1 0 1 NA NA 25 56
100 4 1 1 0 1 45 62 46 270
101 2 0 1 0 1 32.4 100 33 92
More information about the R-help
mailing list