Displaying 20 results from an estimated 21 matches for "goodfit".
2008 Feb 13
1
Does goodfit() require frequency count of the numbers or numbers themselves?
Hello,
I am a student and for project I need R.
I have one problem regarding function goodfit().
Does goodfit() require frequency count of numbers or numbers themselves?
For example suppose I have data say 150 readings.Do I need to use goodfit()
directly on data or
should I make suitable no of bins and then apply goodfit()?
Aswad
[[alternative HTML version deleted]]
2009 Jul 23
1
goodfit() in vcd package: computation of chi-squared
I have troubles understanding how goodfit() function in the vcd package
computes the Pearson coefficient. Can anybody provide more information
on the computation?
In particular, for HorseKicks data in vcd package, goodfit() yields
> oo <- goodfit(HorseKicks,type="poisson",method="MinChisq")
> summary(oo)...
2003 Sep 23
2
(Fwd) Re: goodfit macro
...o. What I need to know is
how to obtain the application itself.
My thanks in advance for any help you can provide.
MS
------- Forwarded message follows -------
Date sent: Tue, 23 Sep 2003 09:14:28 -0400
From: Michael Friendly <friendly at yorku.ca>
Subject: Re: goodfit macro
To: shott at csbs.csbs.uni.edu
Send reply to: friendly at yorku.ca
Organization: York University
You can also carry out goodness of fit tests using the function goodfit
in the vcd package
for R (a free version of S/Splus),
http://www.r-project.org
-Michael
Michael Shott...
2008 Feb 10
1
Error while using fitdistr() function or goodfit() function
...method to "ML" and try again. I tried the run the
first example from the documentation and it failed with the same error.
Changing the estimation method to ML worked.
@List: Can anyone else verify the error I got? I literally ran the
following two lines interactively from the example for goodfit:
dummy <- rnbinom(200, size = 1.5, prob = 0.8)
gf <- goodfit(dummy, type = "nbinomial", method = "MinChisq")
and got back
Warning messages:
1: In pnbinom(q, size, prob, lower.tail, log.p) : NaNs produced
2: In pnbinom(q, size, prob, lower.tail, log.p) : NaNs produced
A...
2010 Mar 16
2
How can I save the result for goodness of fit test
Dear All,
I run the goodness of fit test using goodfit() in vcd package.
The result is as follow:
Goodness-of-fit test for poisson distribution
X^2 df P(> X^2)
Pearson 1.053348 2 0.5905661
Warning message:
In summary.goodfit(gf) : Chi-squared approximation may be incorrect
I want to save the the test statistics(X^2), df, a...
2005 Oct 20
1
goodfit par estimates
Hey,
Does anyone know if there is a way to get back from goodfit what it estimated the parameters to be?
I used the code
fit<-goodfit(round(data$PLX_NRX),type="nbinomial"
and got a pretty good fit. I could not however duplicate this good fit with any parameter estimates that I had.
Any ideas???
Thanks,
Elizabeth Lawson
-------------...
2011 Aug 28
1
How to add a legend to a goodness-of-fit plot (vcd:goodfit)?
Hello,
Sample code:
library("vcd")
dummy <- rnbinom(200, size=1.5, prob=0.8)
gf <- goodfit(dummy, type="nbinomial", method="MinChisq")
plot(gf)
I would like to:
1. add a lgened stating the bars show the actual counts and the red
dots - the fit.
2. show the goodness-of-fit values calculated somewhere on an empty
white space ob the plot.
But... the legend command does...
2012 Aug 21
2
Entering a table
...[1:5] "A" "B" "C" "D" ...
I also tried:
vex <- c(109,65,22,3,1)
vec <- as.table(vex)
str(vec)
table [1:5(1d)] 109 65 22 3 1
- attr(*, "dimnames")=List of 1
..$ : chr [1:5] "A" "B" "C" "D" ...
goodfit(HorseKicks) works fine
goodfit(vec) does not
Thank you,
Thomas
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, co...
2010 Nov 12
1
goodness-of-fit test
...nt 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...
2009 Aug 13
2
Fitting a quasipoisson distribution to univariate data
Dear all,
I am analyzing counts of seabirds made from line transects at sea.
I have been fitting Poisson and negative binomial distributions to the data
using the goodfit function from the vcd library. I would also like to
evaluate how well a quasi-poisson distribution fits the data. However, none
of the potentially suitable functions I have identified (goodfit(vcd),
fitdistr(MASS), fit.dist(gnlm)) includes the quasipoisson distribution as
one of their standard name...
2010 Mar 02
1
test the goodness of it for negative binomial type 2
[code]library(MASS)
x=c(rep(0,8096),
rep(1,1629),
rep(2,233),
rep(3,38),
rep(4,4)
)
x.bar=round(mean(x),4)
x.var=round(var(x),4)
p.hat=round(x.bar/x.var,4)
alpha.hat=round(x.bar*p.hat/(1-p.hat),4)
fitdistr(x, "Negative Binomial")
fitdistr(x, "Poisson")[/code]
1- fitdistr(x, "Negative Binomial")
the parameters got here,
2004 Jun 29
1
Goodness of fit test for estimated distribution
...tribution with parameters estimated, for normal,
exponential, gamma distributions, say (e.g. the corrected p-values for
the Kolmogorov-Smirnov or Chi-squared with corresponding ML estimation
method)?
It seems that neither ks.test nor chisq.test handle estimated parameters.
I am aware of function goodfit in package vcd, which seems to it for some
discrete distributions.
Thank you for help,
Christian
***********************************************************************
Christian Hennig
Fachbereich Mathematik-SPST/ZMS, Universitaet Hamburg
hennig at math.uni-hamburg.de, http://www.math.uni-hamb...
2009 Mar 21
1
Goodness of fit for negative binomial model
...d AICctab in the bbmle package to compare model IC. However, I need to test for the goodness of fit of the full model, and have not been able to find a Pearson's Chi Squared statistic in any of the output. Am I missing it somewhere? Is there a way to run the test using either chisq.test() or goodfit()? I would appreciate any suggestions on how to test for goodness of fit in negative binomial models.
Thanks,
Tim Clark
Dept. of Zoology
University of Hawaii
[[alternative HTML version deleted]]
2007 Jun 10
1
R logistic regression - comparison with SPSS
...ried samples but I have some problems to obtain
results for a logistic regression under R.
The following SPSS script
LOGISTIC REGRESSION vir
/METHOD = FSTEP(LR) d007 d008 d009 d010 d011 d012 d013 d014 d015
d016 d017 d018 d069 d072 d073
/SAVE = PRED COOK SRESID
/CLASSPLOT
/PRINT = GOODFIT CI(95)
/CRITERIA = PIN(.10) POUT(.10) ITERATE(40) CUT(.5) .
predicts vir (value 0 or 1) according to my parameters d007 to d073. It
gives me the parameters to retain in the logistic equation and the
intercept.
The calculation is made from a set of values of about 1.000 cases.
I have been unab...
2008 Feb 11
0
Testing for differecnes between groups, need help to find the right test in R. (Kes Knave)
...10. Re: Using 'sapply' and 'by' in one function (hadley wickham)
11. Error in optim while using fitdistr() function
(Jason Q. McClintic)
12. Re: Using 'sapply' and 'by' in one function (Gabor Grothendieck)
13. Re: Error while using fitdistr() function or goodfit()
function (Jason Q. McClintic)
14. Re: Error while using fitdistr() function or goodfit()
function (Aswad Gurjar)
15. Re: Using 'sapply' and 'by' in one function (hadley wickham)
16. building packages for Linux vs. Windows (Erin Hodgess)
17. Re: building packag...
2003 Mar 29
1
Goodness of fit tests
I have a dataset which I want to model using a Poisson distribution, with a given parameter. I would like to know what is the proper way to do a ''goodness of fit'' test using R.
I know the steps I''d take if I were to do it ''manually'': grouping the numbers into classes, calculating the expected frequencies using ''ppois'', then
2004 May 07
1
*** GOODNESS OF FIT FOR BINOMIAL DISTRIBUTED DATA
Hi,
this is probably a very newbie statistical question.
I have some experimental data.
My hypothesis is that the data are binomially distributed with a known N
and p.
I am trying to obtain a sort of p-value to tell me whether or not my
hypothesis is correct.
What can I do with R?
Thank you,
Pier Luca
2004 Dec 22
2
how to fit in R
Good morning,
in my work I need to study data distributions and so I need to fit the
experimental distribution by theoretical curves such as normal, Poison,
binomial and so on. I'd like to know, given a vector of data, for example
x<-rnorm (1000, 10)
if they follow a normal distribution. I'd like to do a fit (to estimate
the parameters of the theoretical distribution) and then a
2005 Jan 13
2
chisq.test() as a goodness of fit test
Dear R-Users,
How can I use chisq.test() as a goodness of fit test?
Reading man-page I?ve some doubts that kind of test is
available with this statement. Am I wrong?
X2=sum((O-E)^2)/E)
O=empirical frequencies
E=expected freq. calculated with the model (such as
normal distribution)
See:
http://www.itl.nist.gov/div898/handbook/eda/section3/eda35f.htm
for X2 used as a goodness of fit test.
Any
2005 Jul 20
4
poisson fit for histogram
I haven't been an R lister for a bit, but I hope to enlist someone's
help here. I think this is a simple question, so I hope the answer
is not much trouble. Can you please respond directly to this email
address in addition to the list (if responding to the list is
warranted)?
I have a histogram and I want to see if the data fit a Poisson
distribution. How do I do this? It is