similar to: goodfit() in vcd package: computation of chi-squared

Displaying 20 results from an estimated 1100 matches similar to: "goodfit() in vcd package: computation of chi-squared"

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
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,
2012 Aug 21
2
Entering a table
I'm trying to enter a frequency table manually so that I can run a goodness of fit test (I only have the frequencies, I don't have the raw data). So for example, let's say I want to re-create the HorseKicks table: library(vcd) data(HorseKicks) str(HorseKicks) 'table' int [1:5(1d)] 109 65 22 3 1 - attr(*, "dimnames")=List of 1 ..$ nDeaths: chr [1:5]
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=
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
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]]
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 ---------------------------------
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),
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
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
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
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,
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
2004 Sep 16
1
barplot with vcd library
'barplot' doesn't seem to work with vcd library. Am I supposed to detach vcd when I want to use barplot? Here's an example. Say I have the following matrix, > m <- matrix(c(1,2,3, 4,5,6, 3,4,5, 2,3,4), ncol=4) > m [,1] [,2] [,3] [,4] [1,] 1 4 3 2 [2,] 2 5 4 3 [3,] 3 6 5 4 Then > barplot(m) gives a barplot of the data. However,
2005 Sep 16
1
How to make two figures in one plot - package vcd
Dear all, I have a problem to make figures with two columns in package vcd. Here an example code I take from "\library\vcd\html\plot.loglm.html" What I need, I want to make two figures in one plot. How could I do that. I have tried with layout(rbind(c(1, 1, 2, 2))) but the same result, two plot. Best wishes, Muhammad Subianto library(vcd) oldpar <- par(mfrow=c(1, 2)) ## mosaic
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
2005 Jan 06
2
library vcd for R rw2001
Is there an upgrate of the vcd library (visualisation of categorical data) for the latest R version? Trying to download it from CRAN I get URL /data/WWW/ftp/pub/R/bin/windows/contrib/r-release/vcd_0.1-3.4.zip was not found on this server. googling it, I found it for instance on http://www.sourcekeg.co.uk/cran/bin/windows/contrib/1.9/ but trying to install it gave me the message >