Going through the R-Dev list, I have found this (from Pedro Afalo),
dated 8 April 2004:
Dear Richard,
The problem that you report is documented (but no solution given) in the
file ch08.R in the scripts directory of nlme package.
I have found the following workaround just by chance, but it
Dear all,
Is there any simple way in R that can I put the all the interactions of the
variables in the OLS model?
e.g.
I have a bunch of variables, x1,x2, x20... I expect then to have
interaction (e.g. x1*x2, x3*x4*x5... ) with some combinations(2 way or higher
dimensions).
Is there
I tried this with aaMI and had no problems, from either i386 or x86_64
Linux. (I think we have only ever said that i386 Linux will work and I
suspect that a big-endian host would not.)
It look as if the transferred files have got corrupted. Marc's suggestion
is unlikely, as these errors are
Hello,
i'm a french student of medical oncology and i'm working on breast
cancer. I have a variable with the histologic type of tumor wich is
between 1 and 5. I use as.factor function to make some variable with
level between 1 and 5. When i put it in the cox model i have only the
level between
In response to a few private e-mails, here a summary of using Delphi, R-DCOM
and R 2.2.0
1) As Earl Glynn noted
( http://finzi.psych.upenn.edu/R/Rhelp02a/archive/50705.html ),
there were a few paths specific to my installation in
http://www.menne-biomed.de/download/RDComDelphi.zip
leading to
Dear Leaf,
I assume that you're using lm() to fit the model, and that you don't really
want *all* of the interactions among 20 predictors: You'd need quite a lot
of data to fit a model with 2^20 terms in it, and might have trouble
interpreting the results.
If you know which interactions you're
Dear Bertrand,
There are only 4 degrees of freedom for a 5-level factor. By default, R
creates contrasts for an unordered factor in a model formula using the
function contr.treatment(), which, also by default, treats the first level
of the factor (class, in your case) as the baseline or reference
Level 1 is treated as the baseline. The coefficient for level 2 for
example is for the hazard ratio between level 2 and level 1. Same thing
for levels 3,4,5 in the output.
HTH,
On Sun, 6 Nov 2005, bertrand wrote:
Hello,
i'm a french student of medical oncology and i'm working on breast
Check out the R Data Import/Export manual, especially
http://cran.r-project.org/doc/manuals/R-data.html#DBI-_002f-RMySQL
and the RMySQL package.
On Sun, 2005-11-06 at 03:37 +, Xiaofan Li wrote:
Dear colleague,
Is it able in R to manipulate data tables as in SQL-based databases?
Is
I do not understand what your question is. Can you clarify with an
example or analogies to other programming language.
my.fun - function(x, y=1){ x^y }
my.fun(5)# returns 5
my.fun(5, 2) # returns 25
my.fun(y=2, x=5) # returns 25
Regards, Adai
On Sun, 2005-11-06 at 03:28
Adai,
I suspect that Xiaofan was looking for the use of a function like
subset(), which of course does enable one to specify filtering criteria
and return a subset of rows in a data frame that satisfy the criteria.
I am presuming that the SQL reference was more towards using SQL
Select/Where
IMHO, the details section of help(formula) provides a nicer help.
Regards, Adai
On Sun, 2005-11-06 at 08:27 -0500, John Fox wrote:
Dear Leaf,
I assume that you're using lm() to fit the model, and that you don't really
want *all* of the interactions among 20 predictors: You'd need quite a
Marc, thanks for pointing out. I completely misread Xiaofan's post.
In addition to your advice, I like to point out the function which()
which selects only the true values. This is comes in handy when one has
missing values or if the condition generates missing values in the data.
Regards, Adai
Have you considered arima and predict.Arima?
spencer graves
Renuka Sane wrote:
I am trying to do a forecasting exercise for a series, x. My forecast
model consists of the following
I first regress log(x) on time and dummy variables for each month.
lm(log(x) ~ time +
i think this question was already answered but just to elaborate,
pass by value means that a copy of the argument is passed to the
function so if the argument is changed in the function its not changed
in the caller. Pass by reference means its changed in the caller too.
R passes by value
Over the last couple of years I have written quite a few
R programs for various psychometric techniques, and I am
regularly updating and expanding what is there. I now
have (wholly or partially), or have planned
-- gifi package (update to homals on CRAN). Code for
multiple correspondence
Doug Bates made an important comment that might help you with this.
I found it via RSiteSearch(nesting in lmer):
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/47423.html;.
If you still have questions after this, please submit another post,
preferably illustrating your
Adai,
Duncan posted a reply to Xiaofan's query, indicating that R is generally
based upon pass by value.
The difference being that within R, either explicit values or explicit
copies of objects are passed as function arguments, as opposed to
passing a memory location reference to the original
If you walk through the code line by line, you can probably find what
you want, then make relatively simple changes to the code so these
things are exported. However, it may not be easy to use, because you
need to understand the parameterization. To obtain that, you may need
to
I have been trying to make use of the odesolve library on my
university's Linux grid - currently R version 2.0.1 is installed and
the system runs 64-bit Scientific Linux based on Redhat. I cannot seem
to get lsoda working when I define the model as a shared C library. For
example, the
Thanks for the information!
Leaf
=== At 2005-11-06, 11:07:31 you wrote: ===
IMHO, the details section of help(formula) provides a nicer help.
Regards, Adai
On Sun, 2005-11-06 at 08:27 -0500, John Fox wrote:
Dear Leaf,
I assume that you're using lm() to fit the model, and that
I've been looking at the kinship package which looks as though it
might be appropriate for my purposes. What I can't find is any
reference to the data that is used in the example code. A dataframe
called d10 with column names, upn, dadid, momid, sex and affect is
required. One can get an idea
You might look through the tests/testcoxme subdirectory. Maybe
the file called cdata.dput ?
On 11/6/05, Patrick Connolly [EMAIL PROTECTED] wrote:
I've been looking at the kinship package which looks as though it
might be appropriate for my purposes. What I can't find is any
reference to the
Hopefully a quick question:
is there a package/routine to perform Box's M (like proc discrim in SAS)
or some other test for whether two multivariate samples (presumed
multivariate normal) have the same v-c matrix? I've looked, but can't
find it.
If not, I can certainly code it up myself (and
1. Have you considered specifying the random effect as a list? This
is mentioned in the help file and discussed in Pinheiro and Bates (2000)
Mixed-Effects Models in S and S-Plus (Springer). On p. 40, they discuss
the following example that might help you:
lme(pixel~day+day^2,
On Sun, 06-Nov-2005 at 03:46PM -0500, Gabor Grothendieck wrote:
| You might look through the tests/testcoxme subdirectory. Maybe
| the file called cdata.dput ?
Close, but not quite. However, it got me looking in the right
place. It's in the tests/testpedigree directory.
Thank you for the
I want to solve the following equation for x
p=a*exp(-x^2/2)+b*P(Zx)
where p,a,b are known, Z is a standard normal
variable. Clearly there is no analytic form for
P(Zx).
I am wondering if any expert could direct one easy way
on this. Thank you.
__
Try ?uniroot and ?pnorm.
On 7/11/2005 11:47 a.m., Cunningham Kerry wrote:
I want to solve the following equation for x
p=a*exp(-x^2/2)+b*P(Zx)
where p,a,b are known, Z is a standard normal
variable. Clearly there is no analytic form for
P(Zx).
I am wondering if any expert could
Try this:
f - function(x, a, b, p) a * exp(-x*x/2)+ b * pnorm(x, lower.tail = FALSE) - p
uniroot(f, lower = -3, upper = 3, a = 1, b = 1, p = 0.5)
On 11/6/05, Cunningham Kerry [EMAIL PROTECTED] wrote:
I want to solve the following equation for x
p=a*exp(-x^2/2)+b*P(Zx)
where p,a,b are known,
You need repeated measures for a random effect to make any sense. I
modified your example as follows, and the error went away.
mytable$RIL2 - rep(1:4, 1:4)
cs2 - corCompSymm(value=0.5, form=~1|RIL2)
model2-lme(mytrait~myloc, data=mytable, random=~1|RIL2,
+
If one series is input and the other output, the traditional
advice (Box and Jenkins 1970 Time Series Analysis, Forecasting and
Control, sec. 11.2.1) is as follows:
1. Fit an ARIMA model to the input.
2. Prewhiten the output series using the model for the input.
I was surprised by:
test - matrix( as.character(1:4), 2)
test
[,1] [,2]
[1,] 1 3
[2,] 2 4
apply(test, 1, paste, sep=+)
[,1] [,2]
[1,] 1 2
[2,] 3 4
apply(test, 1, paste, sep=*)
[,1] [,2]
[1,] 1 2
[2,] 3 4
te - matrix(1:4, 2)
te
[,1] [,2]
[1,]13
John Fox wrote:
Dear Leaf,
I assume that you're using lm() to fit the model, and that you don't really
want *all* of the interactions among 20 predictors: You'd need quite a lot
of data to fit a model with 2^20 terms in it, and might have trouble
interpreting the results.
If you know
The apply function is passing each row of you matrix as a single vector into
paste. If paste receives a single vector and collapse is NULL, it will
simply coerce the vector into a character vector.
However, when you collapse instead of sep
test - matrix( as.character(1:4), 2)
apply(test, 1,
Hi,
I want to use R within a unix shell script where I repeatedly open
and close R (doing some computation within R whilst it is open). i.e.
something like
#!/bin/sh
R --vanilla EOF
# some R commands
EOF
# some unix commands
R --vanilla EOF
# some R commands
EOF
# some unix commands
...etc
Or you could call those other programs from within R. See
?system
On 11/7/05, Stuart Macgregor [EMAIL PROTECTED] wrote:
Hi,
I want to use R within a unix shell script where I repeatedly open
and close R (doing some computation within R whilst it is open). i.e.
something like
#!/bin/sh
On Mon, 7 Nov 2005, Stuart Macgregor wrote:
Hi,
I want to use R within a unix shell script where I repeatedly open
and close R (doing some computation within R whilst it is open). i.e.
something like
#!/bin/sh
R --vanilla EOF
# some R commands
EOF
# some unix commands
R --vanilla
37 matches
Mail list logo