[R] Goodness of fit test in fitdistrplus

2011-11-22 Thread Indrajit Sengupta
I am using the fitdistrplus package in R and would like to do a goodness of 
fit test. But there does not seem to be any option to do that. Any ideas on how 
I can do that?

Thanks  Regards,
Indrajit

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


[R] goodness of fit test for 2-dimensional data in R

2011-03-08 Thread Entropi ntrp
Hi,
I have a certain number of paired data that show errors at the x-axis and
y-axis for the location of a target and is below. My aim is to fit a
distribution to the uncertain location of the target via certain tests such
as Chi-square test (if possible). I was wondering how it can be done in R.
Thanks in advance,
Yasin

 x error y error

 5.5 -0.5  7 -2  -8 -7.5  6 -1  -1.5 -1  8 2  -2 -2  7 -10  2 -4

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] goodness-of-fit test

2010-11-12 Thread Robert A LaBudde

Skew as they are, your data certainly don't look normal. Try lognormal.

The chi-square test gives good results when all counts are 5 or more, 
hence the warning.


At 12:25 AM 11/12/2010, Andrew Halford wrote:

Hi All,

I have a dataset consisting of abundance counts of a fish and I want to test
if my data are poisson in distribution or normal.

My first question is whether it is more appropriate to model my data
according to a poisson distribution (if my test says it conforms) or use
transformed data to normalise the data distribution?

I have been using the vcd package

gf-goodfit(Y,type= poisson,method= MinChisq)

but i get the following error message

Warning message:
In optimize(chi2, range(count)) : NA/Inf replaced by maximum positive value


I then binned my count data to see if that might help

   V1 V2
1   5 34
2  10 30
3  15 10
4  20  8
5  25  7
6  30  0
7  35  3
8  40  2
9  45  3
10 50  1
11 55  0
12 60  1

but still received an error message

 Goodness-of-fit test for poisson distribution

X^2 df P( X^2)
Pearson 2573372 330
Warning message:
In summary.goodfit(gf) : Chi-squared approximation may be incorrect

Am I getting caught out because of zero counts or frequencies in my data?

Andy






--
Andrew Halford Ph.D
Associate Research Scientist
Marine Laboratory
University of Guam
Ph: +1 671 734 2948

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.



Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: r...@lcfltd.com
Least Cost Formulations, Ltd.URL: http://lcfltd.com/
824 Timberlake Drive Tel: 757-467-0954
Virginia Beach, VA 23464-3239Fax: 757-467-2947

Vere scire est per causas scire

__
R-help@r-project.org 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.


[R] goodness-of-fit test

2010-11-11 Thread Andrew Halford
Hi All,

I have a dataset consisting of abundance counts of a fish and I want to test
if my data are poisson in distribution or normal.

My first question is whether it is more appropriate to model my data
according to a poisson distribution (if my test says it conforms) or use
transformed data to normalise the data distribution?

I have been using the vcd package

gf-goodfit(Y,type= poisson,method= MinChisq)

but i get the following error message

Warning message:
In optimize(chi2, range(count)) : NA/Inf replaced by maximum positive value


I then binned my count data to see if that might help

   V1 V2
1   5 34
2  10 30
3  15 10
4  20  8
5  25  7
6  30  0
7  35  3
8  40  2
9  45  3
10 50  1
11 55  0
12 60  1

but still received an error message

 Goodness-of-fit test for poisson distribution

X^2 df P( X^2)
Pearson 2573372 330
Warning message:
In summary.goodfit(gf) : Chi-squared approximation may be incorrect

Am I getting caught out because of zero counts or frequencies in my data?

Andy






-- 
Andrew Halford Ph.D
Associate Research Scientist
Marine Laboratory
University of Guam
Ph: +1 671 734 2948

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


[R] Goodness of fit test for count data

2010-02-22 Thread pinusan

Dear  all, 

I am trying to test goodness of fit. I assume that a data follow Poisson or
Negative binomial distribution. I can test the goodness of fit in case of no
truncated data. However, I could not find any good function or packages when
a data is truncated.  

For example, a frequency table for the number of visiting emergency room in
one hundred one observations past one year is as follow: 
N freq 
1 30 
2 35 
3 26 
4 8 
5 0 
6 2 
7 0 

 I expect the frequency table to satisfy a Poisson distribution or Negative
binomial distribution. However, the distribution is different from the usual
Poisson or Negative binomial distribution because one value, zero, is
excluded. I expect that the distribution is zero truncated distribution. 

In case of SAS, I used NLMIXED procedure to calculate the expected
probability when y=1 … y=n under the assumption that a data follows Poisson
or Negative binomial distribution. And then I run Chi-square test. If you
need the SAS code, I will send E-mail.
I want to run this test in R.
Could you suggest any idea that can I perform this test in R.

Have a nice day.

-- 
View this message in context: 
http://n4.nabble.com/Goodness-of-fit-test-for-count-data-tp1564963p1564963.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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.


Re: [R] Goodness of fit test for count data

2010-02-22 Thread Moshe Olshansky
You can compute the conditional probability that your variable equals k given 
that it is non-zero. For example, if X has poisson distribution with parameter 
lambda then
P(X=k/X!=0) = P(X=k)/(1-P(X=0)) = (exp(-lambda)/(1-exp(-lambda))*lambda^k/k!
Now you can find lambda for which the sum of squares of your errors is minimal 
and then use CHi-aquared test using these expected frequencies.

Similarly for negative binomial distribution.

--- On Tue, 23/2/10, pinusan anh...@msu.edu wrote:

 From: pinusan anh...@msu.edu
 Subject: [R] Goodness of fit test for count data
 To: r-help@r-project.org
 Received: Tuesday, 23 February, 2010, 6:11 AM
 
 Dear  all, 
 
 I am trying to test goodness of fit. I assume that a data
 follow Poisson or
 Negative binomial distribution. I can test the goodness of
 fit in case of no
 truncated data. However, I could not find any good function
 or packages when
 a data is truncated.  
 
 For example, a frequency table for the number of visiting
 emergency room in
 one hundred one observations past one year is as follow: 
 N freq 
 1 30 
 2 35 
 3 26 
 4 8 
 5 0 
 6 2 
 7 0 
 
  I expect the frequency table to satisfy a Poisson
 distribution or Negative
 binomial distribution. However, the distribution is
 different from the usual
 Poisson or Negative binomial distribution because one
 value, zero, is
 excluded. I expect that the distribution is zero truncated
 distribution. 
 
 In case of SAS, I used NLMIXED procedure to calculate the
 expected
 probability when y=1 … y=n under the assumption that a
 data follows Poisson
 or Negative binomial distribution. And then I run
 Chi-square test. If you
 need the SAS code, I will send E-mail.
 I want to run this test in R.
 Could you suggest any idea that can I perform this test in
 R.
 
 Have a nice day.
 
 -- 
 View this message in context: 
 http://n4.nabble.com/Goodness-of-fit-test-for-count-data-tp1564963p1564963.html
 Sent from the R help mailing list archive at Nabble.com.
 
 __
 R-help@r-project.org
 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.


__
R-help@r-project.org 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.


[R] Goodness of fit test / pseudo r^2 measure for Zero Inflated Model

2009-06-24 Thread lara harrup (IAH-P)
Hi 

 

I have been using a Zero-Inflated negative binomial model fitted using
the pscl zeroinfl command but I would like to extract a goodness of fit
measure are there any suitable pseudo R^2 measures available for this
type of analysis to try and assess the amount of variation in the data
explained by the model?

 

I have tried with the pR2 command in pscl (for computing various pseudo
R2 measures), the same package as zeroinfl, but I get the message that
there is no-applicable method when I try it with a zeroinfl model. Any
suggestions most appreciated.

 

Many thanks in advance

 

Lara

 


[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] goodness of fit test

2008-10-01 Thread ctu

Hi Edna,
You could use lapply or sapply to perform the multiple goodness of fit  
tests at the same time.


Chunhao



Quoting Edna Bell [EMAIL PROTECTED]:


Dear R Gurus;

Is there an automated process for goodness of fit tests, please?

I know there is prop.test for one at a time, but I was wondering about
this, please.

Thanks,
Edna Bell

__
R-help@r-project.org 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.



__
R-help@r-project.org 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.


[R] goodness of fit test

2008-09-30 Thread Edna Bell
Dear R Gurus;

Is there an automated process for goodness of fit tests, please?

I know there is prop.test for one at a time, but I was wondering about
this, please.

Thanks,
Edna Bell

__
R-help@r-project.org 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.


[R] Goodness of fit test

2008-07-02 Thread martin . gaston
Dear R users,
I have some data sets and I'd want to test if they are genarated under
different probability functions. That is, some of them by gamma
distribution, exponential one etc.

Could anybody propose me any test (or procedure) to see that.
I search something similar to the normality tests.

Thanks in advance

Martín Gastón

__
R-help@r-project.org 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.