Displaying 20 results from an estimated 6000 matches similar to: "Moderated list?"
2002 Feb 20
3
Pointer to covariates?
In the first line, use the dist function, found in library mva,
to get the distance between each pair of rows. From this
calculate an incidence matrix for which element i,j is true if
row i in dat equals row j in dat (and false elsewhere).
In the second line, for each row calculate the indices of
the matching rows and take the minimum of those as the key.
incid <-
1999 Dec 07
4
Finding indices with a certain property
I want the indices i for which x[i] < 0 (say):
> x <- c(1, -1, 3, 3, -2)
> where.negative(x)
[1] 2 5
Surely where.negative is something simple, but how?
G?ran
--------------------------------------------------------------
G?ran Brostr?m
Department of Statistics tel: +46 90 786-5223
Ume? University fax: +46 90 786-6614
S-90187 Ume?, Sweden
2005 Aug 19
2
Handling dates
I have a problem with some functions handling dates, in packages 'date' and
'survival' (they seem to be identical). For instance, from the documentation,
--------------------
mdy.date {survival}
R Documentation
Convert to Julian Dates
Description
Given a month, day, and year, returns the number of days since January 1, 1960.
Usage
mdy.date(month, day, year, nineteen = TRUE,
2003 Jun 07
2
Ordering long vectors
I need to order a long vector of integers with rather few unique values.
This is very slow:
> x <- sample(rep(c(1:10), 50000))
> system.time(ord <- order(x))
[1] 189.18 0.09 190.48 0.00 0.00
But with no ties
> y <- sample(500000)
> system.time(ord1 <- order(y))
[1] 1.18 0.00 1.18 0.00 0.00
it is very fast!
This gave me the following idea: Since I don't care
2002 Oct 17
2
'text' can't find "x"
I wanted to add some text to a plot and got (R-1.6.0, Linux):
> text(x = c(1, 4), y = 5, labels = x)
Error in text.default(x = c(1766, 1895), y = 5, labels = x) :
Object "x" not found
With the default value of 'labels':
> text(x = c(1, 2), y = 5, labels = seq(along = x))
Error in seq(along = x) : Object "x" not found
A scoping bug? :)
But
>
2011 Sep 09
2
get and save
I have a data frame 'tmp' and a vector 'name' containing 'd2'.
I want to save 'tmp' under the name hidden in 'name', and the file must have
the same name, plus the extension '.rda'.
So I try
> tmp
x y
1 1 3
2 2 4
> name
[1] "d2"
> assign(name, tmp)
> summary(get(name))
x y
Min. :1.00 Min. :3.00
1st
2011 Jul 01
3
multiple moderated regression steps
hi,
?m studying moderated effects of percieved social support and justice world
belief on relationship between stress coping strategies and depression
level. ? haver never run this analysis before soi ? want to check my steps
whether correct or not.
first ? run regression
in step 1
centered independent variables and centered moderators
in step2
two way interactions
instep 3
three way
2002 Sep 10
3
XP woes
Working with Windows XP and debian Samba 2.2.3a on a box as my PDC. Sign
or seal patch
was applied. The past few days when we have been adding new computers
running windows XP to
the domain we have had machines tell us they have joined the domain, but
when we
try to log onto them using a "domain" account we get the following error on
the
PC:
"The system could not log you on to
2011 May 02
3
ID parameter in model
Hello,
I am apparently confused about the use of an id parameter for an event
history/survival model, and why the EHA documentation for aftreg does
not specify one. All assistance and insights are appreciated.
Attempting to specifiy an id variable with the documentation example
generates an "overlapping intervals" error, so I sorted the original
mort dataframe and set subsequent entry
2013 Oct 16
2
How to obtain restricted estimates from coxph()?
Hello,
I'm trying to use coxph() function to fit a very simple Cox proportional
hazards regression model (only one covariate) but the parameter space is
restricted to an open set (0, 1). Can I still obtain a valid estimate by
using coxph function in this scenario? If yes, how? Any suggestion would be
greatly appreciated. Thanks!!!
[[alternative HTML version deleted]]
2012 Oct 16
1
Why such flagged email is allowed anyway?
>>
>> I highly recommend the following site:
I intentionally deleted the dangerous link that was previously posted
here.
>Sure.
>And take the next time more time to explain why you recommend it.
>Mostly because to get beyond a moderator of this mailinglist.
>
>In other words:
>Stappers considered the blut URL dropping as spam.
>He flagged the posting E-mail
2006 Sep 12
1
DateHelper doesn't handle MonthDays?
I was looking at using the date helper functions for inputing a date for
some records, and was highly disappointed to see that they will allow
the entry of an invalid date such as Sept 31.
It sure would be nice to see the days available change based on the
month selected so the user cannot enter an invalid date that must later
be reentered.
Does anyone know of a plugin or if anyone has
2000 Dec 12
1
reinstalling SIGCHLD handler before wait()
HP-UX 11 is looping on SIGCHLD/sigchld_handler2() when exiting a
protocol 2 session apparently because we don't call wait before
reinstalling the handler. Any thoughts on this issue or how to address
it?
serverloop.c from latest snapshots:
void
sigchld_handler2(int sig)
{
int save_errno = errno;
debug("Received SIGCHLD.");
child_terminated = 1;
signal(SIGCHLD,
1999 Apr 02
4
PLATFORMS Update
NAME Douglas Bates
EMAIL bates@stat.wisc.edu
VERSION 0.63.3
PLATFORM i386-unknown-linux
SYSTEM Debian 2.1
CC/FC/MAKE egcs/g77/make
NAME Martyn Plummer
EMAIL plummer@iarc.fr
VERSION 0.63.3
PLATFORM i386-unknown-linux
SYSTEM Redhat 5.1
CC/FC/MAKE gcc/egcs-g77/make
NAME Göran Broström
EMAIL gb@stat.umu.se
VERSION 0.63.3
PLATFORM
2002 Oct 08
2
Frailty and coxph
Does someone know the rules by which 'coxph' returns 'frail', the
predicted frailty terms? In my test function:
-----------------------------------------------
fr <- function(){
#testing(frailty terms in 'survival'
require(survival)
dat <- data.frame(exit = 1:6,
event = rep(1, 6),
x = rep(c(0, 1), 3),
2003 Mar 12
1
'summary' with logicals (PR#2629)
Consider
> oj <- data.frame(x = c(TRUE, FALSE, NA))
> oj
x
1 TRUE
2 FALSE
3 NA
> summary(oj)
x
Mode :logical
FALSE:1
TRUE :1
But
> oj$x <- factor(oj$x)
> summary(oj)
x
FALSE:1
TRUE :1
NA's :1
My point is that NA's should be reported for logicals like they are for
other data types.
Göran
---
Göran
2002 Oct 08
1
Numeric to factor
I find 'How do I convert factors to numeric?' in the FAQ (7.12), but not
the other way around. Trivial maybe, but
> codes(factor(c(2, 10))
[1] 2 1
> codes(factor(c(2, 9)))
[1] 1 2
How do I get the levels attached to the codes in numeric order?
G?ran
---
G?ran Brostr?m tel: +46 90 786 5223
Department of Statistics fax: +46 90 786 6614
Ume? University
2003 May 14
2
Two names of a function
Is it possible to let a function be known under two names without having
two identical copies of the function body?
---
G?ran Brostr?m tel: +46 90 786 5223
Department of Statistics fax: +46 90 786 6614
Ume? University http://www.stat.umu.se/egna/gb/
SE-90187 Ume?, Sweden e-mail: gb at stat.umu.se
2001 Dec 07
3
rbind and data.frame
G=F6ran,
At 11:04 07/12/01 +0100, G=F6ran Brostr=F6m wrote:
>On Wed, 5 Dec 2001, G=F6ran Brostr=F6m wrote:
>
>[...]
>=20
>> My real problem is how to create a data frame in a sequentially growing
>> manner, when I know the final size (no of cases). I want to avoid to
>> call 'rbind' many times, and instead create an 'empty' data frame in
>> one
2005 Sep 05
12
TeX distribution on Windows
I'm looking for a Windows distribution of TeX that works with R, after a
few years' absence from Windows. On Duncan Murdoch's Rtools page fptex is
still recommended, but it turns out that fptex is "defunct" as of May 2005,
see
http://www.metz.supelec.fr/~popineau/xemtex-7.html
So, what is suggested? TUG (tug.org) recommends something called proTeXt,
which is said to be