Interesting thread. The graphics are great, the only thing that might be
worth doing for teaching purposes would be to illustrate the original
distribution that is being averaged 1000 times.
Below is one option based on Bill Venables code. Note that to do this I
had to start with a k of 2.
N <-
Recent changes to read.spss() in the foreign package return a dataframe
containing additional attributes. For example,
>TEMP<-read.spss(choose.files(), to.data.frame=T,use.value.labels=F)
> str(TEMP)
`data.frame': 780 obs. of 8 variables:
$ EXPOS01: atomic 1 1 2 1 2 3 2 4 2 1 ...
I have a case where I would like to change multiple columns containing
numbers to factors. I can change each column one at a time as in:
TEMP.FACT$EXPOS01<-factor(TEMP.FACT$EXPOS01,levels=c(1,2,3),labels=c("No
ne","Low Impact","MedHigh Imp"))
TEMP.FACT$EXPOS02<-factor(TEMP.FACT$EXPOS02,levels
We have been using Least Angle Regression (lars) to help identify
predictors in models where the outcome is continuous. To do so we have
been relying on the lars package. Theoretically, it should be possible
to use the lars procedure within a general linear model (glm) framework
- we are particul
Newsgroup members,
Does anyone have a clever way to simulate a correlation matrix such that
each column contains dichotomous variables (0,1) and where each column
has different prevalence rates.
For instance, I would like to simulate the following correlation matrix:
> CORMAT[1:4,1:4]
Recently, I was working with some lagged designs where a vector of
observations at one time was used to predict a vector of observations at
another time using a lag 1 design. In the work, I noticed a lot of
negative correlations, so I ran a simple simulation with 2 matched
points. The crude simul
Looking for help with the following problem.
Given a sample of zeros and ones, for example:
> VECTOR1<-rep(c(1,0),c(15,10))
> VECTOR1
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
How would I create a new sample (VECTOR2) also containing zeros and
ones, in which the phi-coeff
Monday, September 12, 2005 1:34 AM
To: r-help@stat.math.ethz.ch
Subject: [R] Simulate phi-coefficient
> From: "Bliese, Paul D LTC USAMH" <[EMAIL PROTECTED]>
>
> Given a sample of zeros and ones, for example:
> > VECTOR1<-rep(c(1,0),c(15,10))
> How would I create a n
Classification: UNCLASSIFIED
Caveats: NONE
I have a large group randomized trial (pre-post design) where the
randomization was marginally successful. Given the pre-existing
differences among groups, it makes sense to report adjusted means (aka
least squares means though I estimated them via pre
R Version 2.2.0
Platform: Windows
When I use barplot but select a ylim value greater than zero, the graph
is distorted. The bars extend below the bottom of the graph.
For instance the command produces a problematic graph.
barplot(c(200,300,250,350),ylim=c(150,400))
Any help would
Sorry if this is an obvious question...
I'm estimating a simple binomial generalized additive model using the
gam function in the package mgcv. The model makes sense given my data,
and the predicted values also make sense given what I know about the
data.
However, I'm having trouble interp
All,
Appreciate any leads on the following:
In a recent blind-validation study of a depression screening instrument
we used a two-stage sampling design.
In stage 1, we used a broad paper-and-pencil screen to identify likely
positives (say 30% of entire sample). In stage 2 we conducted
Does anyone know of another version of the Mcnemar test that provides:
1. Odds Ratios
2. 95% Confidence intervals of the Odds Ratios
3. Sample probability
4. 95% Confidence intervals of the sample probability
Obviously the Odds Ratios and Sample probabilities are easy to calculate
f
13 matches
Mail list logo