[R] Error in inherits(x, "data.frame") : object "Dataset" not found
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Jun 6 14:18:12 CEST 2006
On Tue, 6 Jun 2006, Bob Green wrote:
> 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,
I suspect you wanted
logreg <- read.csv("c:\\logregtest.csv", header=TRUE)
model <- glm(cbind(successes, failures) ~ ., family=binomial, data=logreg)
>
> 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
[...]
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list