I assume that you want to do the fitdistr on one of the columns of the
dataframe that you have read in. What does 'str(ONES3)' show?  If the
data is in the first column, try:

fitdistr(ONES3[[1]],"chi-squared")


On 9/9/07, Terence Broderick <[EMAIL PROTECTED]> wrote:
> I am trying to fit the chi-squared distribution to a set of data using the 
> fitdistr function found in the MASS4 library, the data set is called ONES3, I 
> have loaded it using the command
>
>  ONES3<-read.table("ONES3.pdf",header=TRUE,na="NA")
>
>  I print out the dataset ONES3 to the screen to make sure it has loaded
>
>  Then I try to fit this data using the command fitdistr
>
>   fitdistr(ONES3,"chi-squared")
>
>  and it returns the comment
>
>  Error in fitdistr(ONES3, "chi-squared") : 'x' must be a non-empty numeric 
> vector
>
>  Can anybody help with this, I imagine it is a common mistake for beginners 
> like myself
>
>
>
> audaces fortuna iuvat
>
> ---------------------------------
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to