This should work
which((x==2)|(x==3))
--Quotable Quotes-
A Smile costs Nothing But Rewards Everything
- Anonymous
Happiness is not perfected until it is shared
I am trying to simulate a series of ones and zeros (1 or 0) and I am using
"rbinom" but realizing that the number of successes expected is not accurate.
Any advice out there.
This is the example:
N<-500
status<-rbinom(N, 1, prob = 0.15)
count<-sum(status)
15 percent of 500 should be 75 but wha
e eventual nature of
the distribution.
I mean if I simulated a Normal (0, 1) and got a Normal(1.5, 2) these would be
very different distributions. It is the same with simulating a Binomial(1,
p=0.15) and getting Binomial(1, 0.154)
[EMAIL PROTECTED] wrote: On 28-May-08 12:53:26, Philip Twum
I am trying to define groupings from levels of factor variables and this the
warning message that R give
"& not meaningful for factors".
The nature of my task is this. I have a variable stage which has the levels
(1B, 2A, 2B) - these are the AJCC TNM stages of cancer, and another variable
di
ying to do a logical operation ("&") between two
factors and that operation is not defined. This is what the error message is
saying.
Also you first attempt is probably missing a comma:
node1 <- data.trt[data.trt$stage=="1B" & data.trt$diameter=="
I think not considering the zero cells compromises the estimates you derive
from you analysis. For instance, what will be the value of N used in the MLE
estimation?
You can ZIP - Zero Inflated Poisson which should provide you with the means to
account for the zeros. R has funstions to do that.
R has wonderful graphics but I am wondering whether there is anything in R to
provide customization of tables like PROC Report does in SAS.
A Smile costs Nothing
But Rewards Everything
Happiness is not perfected until it is shared
I think a first step in getting some help is to summarize your data for easy
evaluation. Model fitting (?) will require some information providing some
information like;
1. What is the response variable here
2. What are the covariates (cofactors and possibly the levels of factors)
Then the dat
Try
require(gregmisc)
rename(data, from="old_name", to="new_name")
A Smile costs Nothing
But Rewards Everything
Happiness is not perfected until it is shared
-Jane Porter
--- On Tue, 7/1/08, [EMAIL PROTECTED] <[EMAI
I am new to more radical programming in R. I am trying to write a nested 'for'
loop to produce output that takes subscripts like:
for i taking values 1,2,3,4,5 and
j taking values 1,2,3
I want to output for a computation using the combination values of i and j a
value x like this;
i j
Hi Marshall,
This link provides very good directions and examples you can use.
http://www.image.ucar.edu/GSP/Software/Netcdf/
A Smile costs Nothing
But Rewards Everything
Happiness is not perfected until it is shared
-Jane Por
To select another reference level from the default that R chooses you can use
the "relevel" function
example;
Reorder Levels of Factorwarpbreaks$tension <- relevel(warpbreaks$tension,
ref="M")
summary(lm(breaks ~ wool + tension, data=warpbreaks))
function findlink(pkg, fn) {
var Y, link;
Y =
I will really appreciate help with plotting some forest plots. I am trying to
show disparities in hazard ratios (and confidence intervals) for a set of
covariates for 2 treatments (A and B say).
I will to be able to keep the column of text (covariate names) but plot the 2
forest plots on an ex
You may have to change/scale the sizes of the font by using "cex" and
then to keep all labels within the plotting window, use "xpd=TRUE".
Like in
text(fit, use.n=TRUE, cex=0.8, xpd=TRUE)
Philip
--
A Smile costs Nothing But Rewards Everything
According to the microsoft site "http://support.microsoft.com/kb/323626";, SYLK
files are
ordinary text or csv files with a peculiar character in that the first two
characters of the file are the uppercase letters.
For example for a csv file, the first column may contain the
v
Hi friends,
I need suggestions/directions on how to producing a waterfall plot for present
extend of change in tumour size for a set of respondents in a study. Example
of use of waterfall plot is in the following slides presented at ASCO 2007 by
Axel Grothey. Link is
http://media.asco.org/pla
If you are using the windows version, installing packages can be done easily
from the prompt in the R work space by the following statement:
install.packages("name_of_package", dep=TRUE)
the part of dep=TRUE is to allow associated dependencies of packages tp be
installed along side. This saves
17 matches
Mail list logo