similar to: Goodness-of-fit for zero-truncated poisson distribution

Displaying 20 results from an estimated 1000 matches similar to: "Goodness-of-fit for zero-truncated poisson distribution"

2008 Oct 05
1
Sample mean in R
I am having issues with the following: (muhat = 1/n^2(sum of all the xi's) ) essentially if xbar = the sample mean, muhat = sample mean but square the n. Question: Use R to run a Monte Carlo simulation which compares the finite-sample performance of xbar and muhat. Specifically generate 1000 samples n=30 from a standard normal distribution. For each sample calculate xbar and muhat. I have
2011 Sep 02
5
Hessian Matrix Issue
Dear All, I am running a simulation to obtain coverage probability of Wald type confidence intervals for my parameter d in a function of two parameters (mu,d). I am optimizing it using "optim" method "L-BFGS-B" to obtain MLE. As, I want to invert the Hessian matrix to get Standard errors of the two parameter estimates. However, my Hessian matrix at times becomes
2008 May 02
0
Adaptive design code
I have been trying to create code to calculate the power for an adaptive design with a survival endpoint according to the method of Schafer and Muller ('Modification of the sample size and the schedule of interim analyses in survival trials based on interim inspections,' Stats in Med, 2001). This design allows for the sample size to be increased (if necessary) based on an interim look at
2010 Sep 01
1
[Q] Goodness-of-fit test of a logistic regression model using rms package
Hello, I was looking for a way to evaluate the goodness-of-fit of a logistic regression model. After googling, I found that I could use "resid(fit, 'gof')" method implemented in the rms package. However, since I am not used to the "le Cessie-van Houwelingen normal test statistic," I do not know which statistic from the returned from the "resid(fit,
2010 Jul 07
1
Different goodness of fit tests leads to contradictory conclusions
I am trying to test goodness of fit for my legalistic regression using several options as shown below.  Hosmer-Lemeshow test (whose function I borrowed from a previous post), Hosmer–le Cessie omnibus lack of fit test (also borrowed from a previous post), Pearson chi-square test, and deviance test.  All the tests, except the deviance tests, produced p-values well above 0.05.  Would anyone please
2011 May 08
1
Hosmer-Lemeshow 'goodness of fit'
I'm trying to do a Hosmer-Lemeshow 'goodness of fit' test on my logistic regression model. I found some code here: http://sas-and-r.blogspot.com/2010/09/example-87-hosmer-and-lemeshow-goodness.html The R code is above is a little complicated for me but I'm having trouble with my answer: Hosmer-Lemeshow: p=0.6163585 le Cessie and Houwelingen test (Design library): p=0.2843620
2005 Apr 05
2
Stats Question: Single data item versus Sample from Norma l Distribution
Here's one possibility, assuming muhat and sigmahat are estimtes of mu and sigma from N iid draws of N(mu, sigma^2): tStat <- abs(x - muhat) / sigmahat pValue <- pt(tStat, df=N, lower=TRUE) I'm not quite sure what df tStat should have (exercise for math stat), but given fairly large N, that should make little difference. Andy > From: Ross Clement > > Hi. I have a
2007 Jan 26
1
plotting results from tapply
Hi, there I'm trying to plot what is returned from a call to tapply, and can't figure out how to do it. My guess is that it has something to do with the inclusion of row names when you ask for the values you're interested in, but if anyone has any ideas on how to get it to work, that would be stellar. Here's some example code: y1<-rnorm(40, 2) x1<-rep(1:2, each=20)
2007 May 21
2
Questions about bwplot
Dear R-experts, I have some questions about boxplots with lattice. My data is similar as in the example below, I have two factors (Goodness of Fit and Algorithms) and data values but in each panels the scales are quite different, therefore the normal boxplots produced by set.seed(1) GOF <- factor(rep(c("GOF1","GOF2","GOF3"),each=40)) Alg <-
2000 Nov 03
1
Chi-square Goodness of Fit Test
Dear R-users, is there a function for the Chi-square Goodness of Fit Test in R (compare function chisq.gof in S/S-PLUS). Thanks for help. Matthias Seitzinger -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the
2011 Jun 23
2
Rms package - problems with fit.mult.impute
Hi! Does anyone know how to do the test for goodness of fit of a logistic model (in rms package) after running fit.mult.impute? I am using the rms and Hmisc packages to do a multiple imputation followed by a logistic regression model using lrm. Everything works fine until I try to run the test for goodness of fit: residuals(type=c("gof")) One needs to specify y=T and x=T in the fit. But
2003 Jul 22
4
greek in main title
Hello, I have written a function that demonstrates the CLT by generating samples following the exponential distribution, calculating the means, plotting the histogram, and drawing the limiting normal curve as an overlay. I have the title of each histogram state the sample size and rate (1/theta) for the exponential (the output is actually 4 histograms), but I can't get the greek letter theta
2016 Apr 26
0
survival::clogit, how to extract residuals for GOF assessment
Hi Folks, Hopefully this question has enough R and not too much stats to be appropriate for this list. Based on,* Hosmer et al. 2013. Logistic regression for matched case-control studies. Applied Logistic Regression *(eqtn. 7.8)*, *I am assessing GOF of conditional (or matched) logistic regression models with the *standardized Pearson residuals*. The authors define ?large? as delta chi-squared
2009 Feb 13
0
The effect of MLE and MME to probability of rejection
Hi I am beginner with R I would like to compare the performance of Maximum likelihood Estimator (MLE) and Method of Moment Estimator (MME) effect probability of rejection, p. My MLE is x=rlnorm(10,meanlog = 2, sdlog =5) x xbar=mean(x) ssqrt=var(x) xbar ssqrt #MLE y=log(x) m1=mean(y) s1=var(y) m1 s1 #MME m2=log(xbar^2/sqrt(ssqrt+xbar^2)) s2 = log((ssqrt+xbar^2)/xbar^2) m2
2008 Jun 05
1
(baseline) logistic regression + gof functions?
? Hallo, which function can i use to do (baseline) logistic regression + goodness of fit tests? so far i found: # logistic on binary data lrm combined with resid(model,'gof') # logistic on binary data glm with no gof-test # baseline logit on binary data
2007 Jul 25
3
Constructing bar charts with standard error bars
I am new to R. I want to graph group data using a "Traditional Bar Chart with Standard Error Bar", like the kind shown here: http://samiam.colorado.edu/~mcclella/ftep/twoGroups/twoGroupGraphs.html Is there a simple way to do this? So far, I have only figured out how to plot the bars using barplot. testdata <- scan(, list(group=0,xbar=0,se=0)) 400 0.36038 0.02154 200 0.35927
2012 Mar 08
2
xyplot without external box
Dear list members, Within a loop, I need to create an xyplot with only a legend, not even with the default external box drawn by lattice. I already managed to remove the axis labels and tick marks, but I couldn't find in the documentation of xyplot how to remove the external box. I would really appreciate any help with this ------------- START ----------- library(lattice) x<-1:100
2011 Aug 05
1
Goodness of fit of binary logistic model
Dear All, I have just estimated this model: ----------------------------------------------------------- Logistic Regression Model lrm(formula = Y ~ X16, x = T, y = T) Model Likelihood Discrimination Rank Discrim. Ratio Test Indexes Indexes Obs 82 LR chi2 5.58 R2 0.088 C 0.607 0
2013 Feb 08
2
qcc package
Greets, My data looks like: > p3.18 s xbar subgroup 1 0.84 12.2 1 2 1.64 11.2 2 3 2.07 10.6 3 4 2.49 12.2 4 5 0.84 11.2 5 ... Using the command > qcc(p3.18$xbar,type="xbar",sizes=5,center=mean(p3.18$xbar),std.dev=mean(p3.18$s)/0.94,title="X-bar Chart for Paper Sheet Length Data") I get the x-bar chart I expect. However,
2007 Dec 30
1
Histogram with different colors for different portions
Dear Rusers, I would like to color different sections of a histogram different colors. I have an example that was done by "brute force" given below. Has anyone implemented something like this in general? If not, any suggestions/pointers on how to write a general function to do so would be most appreciated. Alan-