Displaying 20 results from an estimated 200 matches similar to: "Entering a table"
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)
Goodness-of-fit test for poisson distribution
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]]
2008 Feb 10
1
Error while using fitdistr() function or goodfit() function
Try changing your 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,
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, and p-value. How can I save
the result.
2003 Sep 23
2
(Fwd) Re: goodfit macro
Dear R-Help:
As you can see, Prof. Friendly refers me to your site for an
executable version of vcd. I don't mean to be obtuse, but 15 minutes
spent exploring your site failed to locate a downloadable version of the
vcd package to which he referred.
I know plainly what this application can do. What I need to know is
how to obtain the application itself.
My thanks in advance for any
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
---------------------------------
2001 Nov 24
2
horsekicks
Dear friends. I have these well known data on horsekicks:
years <- c(109, 65, 22, 3 , 1, 0)
deaths <- 0:5
and get a nice but wrong fit from
summary(z1 <- glm(years~deaths,family=poisson))
Can I take away the intercept ?
Best wishes
Troels Ring, Aalborg
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2010 Nov 12
1
goodness-of-fit test
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=
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),
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
2010 Nov 10
1
Difficult doubt about choose distances randomly in a matrix with a probability of event
I would like to build a model in R to simulate the seed dispersal by one plant.
The plant produced 5 seeds and the probability of falling inside the eight closest space was 0.8 and in the next space 0.2 and in the rest space 0:
0
0
0
0
0
0
0.2
0.2
0.2
0.2
0.2
0
0.2
0.8
0.8
0.8
0.2
0
0.2
0.8
1
0.8
0.2
0
0.2
0.8
0.8
0.8
0.2
0
0.2
0.2
0.2
0.2
0.2
0
0
0
0
0
0
0
2004 Jun 29
1
Goodness of fit test for estimated distribution
Hi,
is there any method for goodness of fit testing of an (as general as
possible) univariate distribution 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
2009 Mar 21
1
Goodness of fit for negative binomial model
Dear r list,
I am using glm.nb in the MASS package to fit negative binomial models to data on manta ray abundance, and 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
2007 Jun 10
1
R logistic regression - comparison with SPSS
Dear R-list members,
I have been a user of SPSS for a few years and quite new to R. I read
the documentation and tried 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
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,
2008 Feb 11
0
Testing for differecnes between groups, need help to find the right test in R. (Kes Knave)
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of r-help-request at r-project.org
Sent: Monday, February 11, 2008 12:00 PM
To: r-help at r-project.org
Subject: R-help Digest, Vol 60, Issue 11
Send R-help mailing list submissions to
r-help at r-project.org
To subscribe or unsubscribe via the World Wide Web, visit
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
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
2012 Aug 22
1
strange behaviour when sourcing inside function
Dear R community,
I encounter a problem that is counterintuitive to my understanding of
the documentation of source and the "local" argument of that function.
With the following code, I would expect the content of "test.R" to be
evaluated inside the environment of the function "test". This, however,
does not seem to be the case as the object "a" can
2012 Aug 22
1
Plot label axis with expression
Hi all,
I need help with axis in plot.
I want to edit y axis label of my plot. My data is like:
x <- c(100,50,10,1,0.1,0.05,0.001)
plot(log(x))
axTicks(2) # Label of y axis
[1] -6 -4 -2 0 2 4
I'd like that y axis label was like: e^-6, e^-4, etc. (with text "e"
superscript -6, -4, etc.) I try to use expression(), but don't work.
plot(log(x), yaxt="n")