Displaying 20 results from an estimated 4000 matches similar to: "R function which finds confidence interval for binomial variance"
2008 Jun 30
3
Is there a good package for multiple imputation of missing values in R?
I'm looking for a package that has a start-of-the-art method of
imputation of missing values in a data frame with both continuous and
factor columns.
I've found transcan() in 'Hmisc', which appears to be possibly suited
to my needs, but I haven't been able to figure out how to get a new
data frame with the imputed values replaced (I don't have Herrell's book).
Any
2011 Jun 05
3
How to convert a factor column into a numeric one?
I have a data frame:
> head(df)
Time Temp Conc Repl Log10
1 0 -20 H 1 6.406547
2 2 -20 H 1 5.738683
3 7 -20 H 1 5.796394
4 14 -20 H 1 4.413691
5 0 4 H 1 6.406547
7 7 4 H 1 5.705433
> str(df)
'data.frame': 177 obs. of 5 variables:
$ Time : Factor w/ 4 levels
2008 Apr 22
2
Multidimensional contingency tables
How does one ideally handle and display multidimenstional contingency
tables in R v. 2.6.2?
E.g.:
> prob1<- data.frame(victim=c(rep('white',4),rep('black',4)),
+ perp=c(rep('white',2),rep('black',2),rep('white',2),rep('black',2)),
+ death=rep(c('yes','no'),4), count=c(19,132,11,52,0,9,6,97))
> prob1
victim perp
2007 Sep 10
1
S-Plus "resample" package and associated functions
Are there any packages in R that reproduce the package "resample" of S-Plus?
The sample() function in R doesn't provide equivalent flexibility of
bootstrap() and bootstrap2().
================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral at lcfltd.com
Least Cost Formulations, Ltd. URL: http://lcfltd.com/
824
2009 Sep 03
1
Problem accessing functions in package 'roxygen'
I have Vista Home with R-2.9.0, and installed and tried to test the
package 'roxygen':
> utils:::menuInstallPkgs()
trying URL
'http://lib.stat.cmu.edu/R/CRAN/bin/windows/contrib/2.9/roxygen_0.1.zip'
Content type 'application/zip' length 699474 bytes (683 Kb)
opened URL
downloaded 683 Kb
package 'roxygen' successfully unpacked and MD5 sums checked
The
2008 Apr 10
1
Problem installing and using package "tseries"
I have R 2.6.2, and have tried downloading and installing the package
"tseries". I get the same error when I use two different mirror sites:
> utils:::menuInstallPkgs()
trying URL
'http://cran.mirrors.hoobly.com/bin/windows/contrib/2.6/tseries_0.10-14.zip'
Content type 'application/zip' length 400799 bytes (391 Kb)
opened URL
downloaded 391 Kb
package
2010 Jun 21
2
Singularity in simple ANCOVA problem
I'm using R 2.10.1 with the latest version of all packages (updated today).
I'm confused as to why I'm getting a hard singularity in a simple set
of experimental data:
> blots
ID Lot Age Conc
1 1 A 3 4.44
2 2 A 3 4.56
3 3 B 41 4.03
4 4 B 41 4.57
5 5 C 229 4.49
6 6 C 229 4.66
7 7 D 238 3.88
8 8 D 238 3.93
9 9 E 349 4.43
10 10 E 349
2008 Aug 25
1
Specifying random effects distribution in glmer()
I'm trying to figure out how to carry out a Poisson regression fit to
longitudinal data with a gamma distribution with unknown shape and
scale parameters.
I've tried the 'lmer4' package's glmer() function, which fits the
Poisson regression using:
library('lme4')
fit5<- glmer(seizures ~ time + progabide + timeXprog +
offset(lnPeriod) + (1|id),
data=pdata,
2008 Sep 26
0
Confidence interval for binomial variance
Based on simulations, I've come up with a simple function to compute
the confidence interval for the variance of the binomial variance,
where the true variance is
v = rho*(1-rho)/n
where rho = true probability of success and n = # of trials.
For x = # successes observed in n trials, p = x / n as usual.
For p < 0.25 or p > 0.75, I use the proportion-based transformed
confidence
2007 May 03
4
Survival statistics--displaying multiple plots
Hello all!
I am once again analyzing patient survival data with chronic liver disease.
The severity of the liver disease is given by a number which is continuously
variable. I have referred to this number as "meld"--model for end stage
liver disease--which is the result of a mathematical calculation on
underlying laboratory values. So, for example, I can generate a Kaplan-Meier
plot
2008 Mar 08
1
How to do multi-factor stratified sampling in R
Given a set of data with a number of variables plus a response, I'd
like to obtain a randomized subset of the rows such that the marginal
proportions of each variable are maintained closely in the subset to
that of the dataset, and possibly maintaining as well the two-factor
interaction marginal proportions as well for some pairs.
This must be a common problem in data mining, but I
2009 Jul 02
1
Getting identify() to work with lattice::cloud()
I don't seem to be able to put any syntax into identify() that gets
it to work with "lattice" cloud() graph:
layout(1)
require('lattice')
cloud(g3 ~ g1 + g2, data=gapp, col = "blue",
xlab='G1 Score', ylab='G2 Score',
zlab='G3 Score', main='3D Plot for Applicants')
identify(gapp[,2:4], labels=gapp$ID)
Here g1 is gapp[,2], g2
2007 May 27
1
How to reference or sort rownames in a data frame
As I was working through elementary examples, I was using dataset
"plasma" of package "HSAUR".
In performing a logistic regression of the data, and making the
diagnostic plots (R-2.5.0)
data(plasma,package='HSAUR')
plasma_1<- glm(ESR ~ fibrinogen * globulin, data=plasma, family=binomial())
layout(matrix(1:4,nrow=2))
plot(plasma_1)
I find that data points
2009 Mar 27
2
'stretching' a binomial variable
Hi,
Im carrying out some Bayesian analysis using a binomial response variable
(proportion: 0 to 1), but most of my observations have a value of 0 and many
have very small values (i.e. 0.001). I'm having troubles getting my MCMC
algorithm to converge, so I have decided to try normalising my response
variable to see if this helps.
I want it to stay between 0 and 1 but to have a larger range
2011 Feb 09
2
comparing proportions
Hi, I have a dataset that has 2 groups of samples. For each sample, then
response measured is the number of success (no.success) obatined with the number
of trials (no.trials). So a porportion of success (prpop.success) can be
computed as no.success/no.trials. Now the objective is to test if there is a
statistical significant difference in the proportion of success between the 2
groups of
2008 Jul 12
5
shapiro wilk normality test
Hi everybody,
somehow i dont get the shapiro wilk test for normality. i just can?t
find what the H0 is .
i tried :
shapiro.test(rnorm(5000))
Shapiro-Wilk normality test
data: rnorm(5000)
W = 0.9997, p-value = 0.6205
If normality is the H0, the test says it?s probably not normal, doesn
?t it ?
5000 is the biggest n allowed by the test...
are there any other test ? ( i know qqnorm
2007 Jun 08
1
glm() for log link and Weibull family
I need to be able to run a generalized linear model with a log() link
and a Weibull family, or something similar to deal with an extreme
value distribution.
I actually have a large dataset where this is apparently necessary.
It has to do with recovery of forensic samples from surfaces, where
as much powder as possible is collected. This apparently causes the
results to conform to some type
2007 Oct 18
0
Getting 'tilting' confidence intervals in R
I am trying to compute bootstrap confidence intervals for a sample
using R 2.5.1 for Windows.
I can get "Normal", "Basic", "Percentile", "BCa" and "ABC" from
boot.ci() and boot() in the Davison & Hinkley "boot" package.
But I can't figure out how to use tilt.boot() to get the "tilting"
confidence interval.
2008 Apr 22
2
bootstrap for confidence intervals of the mean
d = c(0L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0L, 0L, 7375L,
NA, NA, 17092L, 0L, 0L, 32390L, 2326L, 22672L, 13550L, 18285L)
boot.out <-boot(d, mean, R=1000, sim="permutation")
Error in mean.default(data, original, ...) :
'trim' must be numeric of length one
I know that I am missing something but I can't figure it out.
thanks
stephen
--
Let's not spend our
2012 Oct 02
0
Possible error in BCa method for confidence intervals in package 'boot'
I'm using R 2.15.1 on a 64-bit machine with Windows 7 Home Premium.
Sample problem (screwy subscripted syntax is a relic of edited down a
more complex script):
> N <- 25
> s <- rlnorm(N, 0, 1)
> require("boot")
Loading required package: boot
> v <- NULL # hold sample variance estimates
> i <- 1
> v[i] <- var(s) # get sample variance
>