Suppose I have a vector A=c(1,2,3)
now I want to compare each element of A to another vector L=c(0.5, 1.2)
and then recode values for sum(A0.5) and sum(A1.2)
to get a result of (3,2)
how can I get this without writing a loop of sums?
[[alternative HTML version deleted]]
Hi,
What is the function to calculate penalized cox regression? frailtyPenal in
frailtypack R package imposes max 2 strata. I want to use a function that
reduces all my variables without stratifying them in advance.
Look forward to your reply
carol
-
On 6/10/07, gallon li [EMAIL PROTECTED] wrote:
Suppose I have a vector A=c(1,2,3)
now I want to compare each element of A to another vector L=c(0.5, 1.2)
and then recode values for sum(A0.5) and sum(A1.2)
to get a result of (3,2)
how can I get this without writing a loop of sums?
How
On 10-Jun-07 02:16:46, Gabor Grothendieck wrote:
That can be elegantly handled in R through R's object
oriented programming by defining a class for the fancy input.
See this post:
https://stat.ethz.ch/pipermail/r-help/2007-April/130912.html
for a simple example of that style.
On 6/9/07,
Hi R users,
Suppose we have following data for a regression model:
AGE:numerical
SEX: male/female categorical
COLOR: {blue, green, pink} categorical
RESPONSE: yes/no categorical
AGE SEX COLOR RESPONSE
10 M BLUE Y
12 M GREEN N
13
find the position of the first value who equals certain number in a vector:
Say a=c(0,0,0,0,0.2, 0.2, 0.4,0.4,0.5)
i wish to return the index value in a for which the value in the vector is
equal to 0.4 for the first time. in this case, it is 7.
[[alternative HTML version deleted]]
which(a == .4)[1]
b
On Jun 10, 2007, at 4:45 AM, gallon li wrote:
find the position of the first value who equals certain number in a
vector:
Say a=c(0,0,0,0,0.2, 0.2, 0.4,0.4,0.5)
i wish to return the index value in a for which the value in the
vector is
equal to 0.4 for the first
try this:
which(a == 0.4)[1]
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web:
Douglas Bates wrote:
Frank Harrell indicated that it is possible to do a lot of difficult
data transformation within R itself if you try hard enough but that
sometimes means working against the S language and its whole object
view to accomplish what you want and it can require knowledge of
try ?recode in package:car
--- spime [EMAIL PROTECTED] wrote:
Hi R users,
Suppose we have following data for a regression
model:
AGE:numerical
SEX: male/female categorical
COLOR: {blue, green, pink} categorical
RESPONSE: yes/no categorical
AGE SEX COLOR RESPONSE
Try
match(0.4, a)
Also see ?match and the nomatch= argument, in particular. If your
numbers are only equal to within an absolute tolerance, tol, as
discussed in the R FAQ
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
you may need:
tol -
On 6/10/07, Ted Harding [EMAIL PROTECTED] wrote:
... a lot of the problems with data
files arise at the data gathering and entry stages, where people
can behave as if stuffing unpaired socks and unattributed underwear
randomly into a drawer, and then banging it shut.
Not specifically
Dear All,
I'm trying to model heteroscedasticity using a multilevel model. To
do so, I make use of the nlme package and the weigths-parameter.
Let's say that I hypothesize that the exam score of students
(normexam) is influenced by their score on a standardized LR test
(standLRT).
Hello, I have some problems in using chron, Hmisc, and lattice. First,
using both chron and Hmisc, I get an error message when describing data:
df$Date - chron(df$Date,format=c(d/m/y))
ll - latex(describe(df),file=..//text//df.tex)
Error in formatDateTime(dd, atx, !timeUsed) :
could not
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
Hi,
How to specify the start position of Y in plot command, hopefully I can
specify the range of X and Y axis. I checked the ?plot, it didnot mention
I can setup the range.
Thanks
Pat
__
R-help@stat.math.ethz.ch mailing list
plot( x=rnorm(25, 0.5, 0.3), y=rnorm(25, 4, 1), xlim=c(0,1), ylim=c(2,7))
# ^^
for example
Charles Annis, P.E.
[EMAIL PROTECTED]
phone: 561-352-9699
eFax: 614-455-3265
http://www.StatisticalEngineering.com
-Original
Hi,
I was wondering whether there any feature selection methods for clustering.
Thanks chandra
-
[[alternative HTML version deleted]]
__
Ryuichi Tamura wrote:
Please can you put your package on the CRAN server ?
Many thanks
Diethelm Wuertz
Hello R-list,
I have released an update version (0.3-1) of Rdonlp2.
Some (fatal) bugs which may kill interpreter should be fixed.
In addition, user-visible changes are:
* *.mes, *.pro
Hi,
I was wondering whether there is any package implementing Principal
Component Analysis for Binary data
Thanks chandra
-
[[alternative HTML version deleted]]
plot(x=1:10,y=1:10,xlim=c(0,5),ylim=c(6,10))
a lot of the arguments descriptions for plot() are contained in ?par
--- Patrick Wang [EMAIL PROTECTED] wrote:
Hi,
How to specify the start position of Y in plot command, hopefully I can
specify the range of X and Y axis. I checked the ?plot,
Alain Reymond wrote:
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
Hi,I have a frustrating problem from vista that I wonder if anyone has come
across the same problem. I wrote a script that involves long computational time
(although, during the calculation, it spits out text on the gui to notify me
the progress of the calculation periodically). Windows vista
Since R is supposed to be a complete programming language, I wonder
why these tools couldn't be implemented in R (unless speed is the
issue). Of course, it's a naive desire to have a single language that
does everything, but it seems that R currently has most of the
functions necessary to do the
On 10-Jun-07 14:04:44, Sarah Goslee wrote:
On 6/10/07, Ted Harding [EMAIL PROTECTED] wrote:
... a lot of the problems with data
files arise at the data gathering and entry stages, where people
can behave as if stuffing unpaired socks and unattributed underwear
randomly into a drawer, and
I have a study best described as a retrospective case-cohort design:
the cases were all the events in a given time span surveyed, and the
controls (event-free during the follow-up period) were selected in
2:1 ratio (2 controls per case). The sampling frequency for the
controls was about
At 03:28 PM 6/10/2007, [EMAIL PROTECTED] wrote:
Hi,I have a frustrating problem from vista that I wonder if anyone
has come across the same problem. I wrote a script that involves
long computational time (although, during the calculation, it spits
out text on the gui to notify me the progress
Hi,
I have a problem with initial value for optim in polr that R report. After a
call to polr, it complains that:
Error in optim(start, fmin, gmin, method=BFGS, hessian= Hess, ...) : initial
value in 'vmin' is not finite.
Would you please suggest a way round to this problem? Thank you so much
That's really helpful Robert! I was thinking of writing my output to a file
periodically but that will make my runtime longer. I think this way is better.
Running dir() which contacts windows periodically because it takes much less
time than writing to a file. Thank you.- adschai- Original
Rense,
how about
weights = varPower(form = ~ schavg)
or
weights = varConstPower(form = ~ schavg)
or even
weights = varPower(form = ~ schavg | type)
Yuo might find Pinheiro and Bates (2000) to be a valuable investment.
I hope that this helps,
Andrew
On Sun, Jun 10, 2007 at 04:35:58PM
On 10-Jun-07 19:27:50, Stephen Tucker wrote:
Since R is supposed to be a complete programming language,
I wonder why these tools couldn't be implemented in R
(unless speed is the issue). Of course, it's a naive desire
to have a single language that does everything, but it seems
that R
An important potential benefit of R solutions shared by awk, sed, ...
is that they provide a reproducible way to document exactly how one
got
from one version of the data to the next. This seems to be the main
problem with handicraft methods like editing excel files, it is too
easy to
Have you worked through the examples in the 'nls' help file,
especially the following:
DNase1 - subset(DNase, Run == 1)
fm3DNase1 - nls(density ~ Asym/(1 + exp((xmid - log(conc))/scal)),
data = DNase1,
start = list(Asym = 3, xmid = 0,
MailMarshal (an automated content monitoring gateway) has not
delivered the following message:
Message: B466c9a69.0001.0001.mml
From:r-help@stat.math.ethz.ch
To: [EMAIL PROTECTED]
Subject: [Spam] delivery failed
This is due to automatic rules that have
Hi,
I obtained all the coefficients that I need from polr. However, I'm wondering
how I can obtain the standard error of each estimated coefficient? I saved the
Hessian and do something like summary(polrObj), I don't see any standard error
like when doing regression using lm. Any help would be
Embarrasingly, I don't know awk or sed but R's code seems to be
shorter for most tasks than Python, which is my basis for comparison.
It's true that R's more powerful data structures usually aren't
necessary for the data cleaning, but sometimes in the filtering
process I will pick out lines that
Hi R-users,
Suppose i have a two class discrimination problem and i am using logistic
regression for the classification.
model.logit -
glm(formula=RES~NUM01+NUM02+NUM03+NUM04,family=binomial(link=logit),data=train.data)
Dear All,
1)Can I use lm() to fit more than one response in
single expression. e.g data is a matrix of these
variables
R1 R2 R3 X Y Z
1 2 1 1 2 3
Now i wnat to fit R1:R3 ~ X+Y+Z.
2) How can i use Singular Value decomposition (SVD) as
an alternate to lsq.
Regards,
ggplot2
===
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
none of the bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing
On Sun, 10 Jun 2007, vinod gullu wrote:
Dear All,
1)Can I use lm() to fit more than one response in
single expression. e.g data is a matrix of these
variables
R1 R2 R3 X Y Z
1 2 1 1 2 3
Now i wnat to fit R1:R3 ~ X+Y+Z.
?lm says
If 'response' is a matrix a linear model is
40 matches
Mail list logo