On 19 Nov 2008, at 07:56, Prof Brian Ripley wrote:
I just read an announcement saying that Mathematica is launching a
version working with Nvidia GPUs. It is claimed that it'd make it
~10-100x faster!
http://www.physorg.com/news146247669.html
Well, lots of things are 'claimed' in marketing (a
Hi Kang,
As well as Benjamin's solution, Rolf kindly contributed the function to
the plotrix package, where is it known as "revaxis".
Jim
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting gui
Trying to plot ATR of time series using SMA using quantmod, plots fine
with maType="EMA".
However, when I use maType="SMA" I get the following error:
Error in SMA(c(0, 0, 0, 0, 0, ... :
unused arguments(s) (wilder = FALSE)
Calls: addATR -> ATR -> do.call -> SMA
Execution halted
The code I am u
On 18/11/2008 1:36 PM, William Dunlap wrote:
Duncan Murdoch murdoch at stats.uwo.ca Sat Nov 8 15:41:34 CET 2008
wrote:
On 08/11/2008 7:20 AM, John Wiedenhoeft wrote:
Hi there,
I rejoiced when I realized that you can use Perl regex from within
R. However,
as the FAQ states "Some functions, pa
Hi
I managed to compile (and use) C code from R, but now I have to use C++ code.
After reading "Writing R extensions", I came up with the following
code, which compiles fine
---
// emdL1_R.cc:
#include
#include
#include "emdL1.h"
extern "C"
{
void emd_L1(
doubl
Hi!
I would like to perform an F-Test over more than one variable within a
generalized mixed model with Gamma-distribution
and log-link function. For this purpose, I use the package mgcv.
Similar tests may be done using the function "anova", as for example in
the case of a normal
distributed
I am having difficulties installing the RMySQL package (0.6-1) on a
clean install of pclinuxos with R version 2.5.1. My version of the OS
came with R-base already installed along the RKWard GUI front end.I have
attempted to install the package through RKWard however I have had some
problems.
Hi Roger,
As we know that The Oja median has (finite) breakdown point 2/n, i.e.,
is not robust in any reasonable sense, and is quite expensive to
compute, so do we have some better methodology to compute multivariate
median
Rahul Agarwal
Analyst
Equities Quantitative Research
UBS_ISC, Hyder
Rainer M Krug wrote:
Hi
I managed to compile (and use) C code from R, but now I have to use C++ code.
After reading "Writing R extensions", I came up with the following
code, which compiles fine
---
// emdL1_R.cc:
#include
#include
#include "emdL1.h"
extern "C"
{
void em
On Wed, Nov 19, 2008 at 2:57 PM, Duncan Temple Lang
<[EMAIL PROTECTED]> wrote:
>
>
> Rainer M Krug wrote:
>>
>> Hi
>>
>> I managed to compile (and use) C code from R, but now I have to use C++
>> code.
>> After reading "Writing R extensions", I came up with the following
>> code, which compiles fin
I'm trying to write a simple wrapper for plotting functions to make
them print to postscript, something like
ploteps <- function(file, plotFunction, ...) {
args <- list(bquote(...))
# prepare postscript device
do.call(plot, args)
# close postscript device
}
I have inserted the bquote
Try this:
f <- function(cmd, ...) {
cat("Hello\n")
mc <- match.call()
mc <- mc[-1]
eval.parent(mc)
cat("Goodbye\n")
}
f(plot, 1:10)
On Wed, Nov 19, 2008 at 8:57 AM, Roberto Brunelli
<[EMAIL PROTECTED]> wrote:
> I'm trying to write a simple wrapper for plot
The help pages (here for bquote) are your friend.
I don't think you really want to do this via do.call(), as you want some
arguments evaluated and some unevaluated. Rather, match.call(), alter it
as you want, and then eval.parent it. Something like
ploteps <- function(file, plotFunction, ..
Greetings all
The help file for GAMM in mgcv indicates that the log likelihood for a
GAMM reported using
summary(my.gamm$lme) (as an example) is not correct.
However, in a past R-help post (included below), there is some indication
that the likelihood ratio test in anova.lme(mygamm$lme, mygamm1
On Wed, Nov 19, 2008 at 6:55 AM, Björn Stollenwerk
<[EMAIL PROTECTED]> wrote:
> Hi!
> I would like to perform an F-Test over more than one variable within a
> generalized mixed model with Gamma-distribution
> and log-link function.
Are you using the phrase "F-Test" as a general term for model
com
In the optim() function there is a syntax :
res <- .Internal(optim(par, fn1, gr1, method, con, lower,
Here how can I see the inside-codes of ".Internal" function ?
Regards,
--
View this message in context:
http://www.nabble.com/How-to-look-within-.Internal---tp20581897p20581897.html
Sent fr
On 11/19/2008 10:13 AM, megh wrote:
In the optim() function there is a syntax :
res <- .Internal(optim(par, fn1, gr1, method, con, lower,
Here how can I see the inside-codes of ".Internal" function ?
You need the R source code. Then find src/main/names.c, and look up
"optim". It will te
Thanks! I am talking about any kind of model comparison technique.
However, some p-values based on F-Tests are supplied, based on the GLMM
with Gamma distribution and log-link function (see output below). I
think this can be done, because the parameter estimates are
approximately normal distri
Hi,
I am currently trying to install R on our serveur.
It is a SUSE LINUX Entreprise Serveur 10 version.
I can't use the binaries which are compiled for OPEN SUSE, can I ?
So I have downloaded the .tar.gz file
When configuring I got the following error message
configure: error: --with-readline=ye
I have a list of entrants (1-14 in this example) in a competitive event and
corresponding win probabilities for each entrant.
[(1, 0.049), (2, 0.129), (3, 0.043), (4, 0.013), (5, 0.015), (6,
0.040), (7, 0.066), (8, 0.038), (9, 0.204), (10, 0.022), (11, 0.234),
(12, 0.044), (13, 0.068),
Hello! I want to create a command for choosing input parameters via a new
window that shows a table in which the parameters can be written in. R
should open a seperate window in which the user is asked to put in some
values (just numbers), afterwards a new file containing these values should
be c
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi!
If you go there:
http://software.opensuse.org/search
and look for r-base on SLE 10 you should get what you
are looking for.
I don't put SLE rpms on CRAN because I can't support
them on SLE. I've no SLE install available.
If you want to compile
Try this:
x <- c(1, 0.049, 0.129, 0.043, 0.013, 0.015, 0.040, 0.066,
0.038, 0.2040, 0.0221, 0.234, 0.0443, 0.0684, 0.035)
cl <- kmeans(x, 5)
cl
newold <- with(cl, data.frame(old = x, new = centers[cluster]))
newold
On Wed, Nov 19, 2008 at 10:43 AM, Random Walker <[EMAIL PROTECTED]> wrote:
Hi All,
I'm sorry I haven't been able to find anything that will help me with this
problem, and I'm still pretty new to R - so any help here is greatly
appreciated!
I am looking to create a vector in a sequential process where each entry in
the vector is a data frame, for example:
days <- 3
for
Hello all,
I would like to install a new R package named SPIA, but I have only the source
version ( tar.gz version) and I work with windows.
Can anyone support to me any information to perform the installation of this
package?
Any suggestion will be appreciated.
Thank you
Erika
[[alt
On 11/19/2008 11:27 AM, Brigid Mooney wrote:
Hi All,
I'm sorry I haven't been able to find anything that will help me with this
problem, and I'm still pretty new to R - so any help here is greatly
appreciated!
I am looking to create a vector in a sequential process where each entry in
the vecto
Hi
I looked in the "writing R extensions" and also into package.skeleton,
but could not find anything:
I am looking for a skeleton or simple example on how to create a
package which contains C++ code.
I only want to implement one function, so nothing complicated. The
idea is to use the package t
Both the 'Writing R Extensions' and 'R Installation and Administration'
manuals point you at the win-builder service. The latter also tells you
how to set Windows up to build source packages.
On Wed, 19 Nov 2008, Erika Melissari wrote:
Hello all,
I would like to install a new R package name
On 19 November 2008 at 18:44, Rainer M Krug wrote:
| I looked in the "writing R extensions" and also into package.skeleton,
| but could not find anything:
|
| I am looking for a skeleton or simple example on how to create a
| package which contains C++ code.
|
| I only want to implement one func
One simple way would be to just use the edit function:
> mydata <- edit( data.frame( param1=numeric(0), param2=numeric(0),
> param3=numeric(0) ) )
> write.table(mydata, 'myfile')
A little more fancy interface could come from using the tkexamp function in the
TeachingDemos package (with wait=TRU
Correction: I made some mistake in my bucket/cluster list. It should be:
[((4, 5, 10), 0.024),
((1, 3, 6, 8, 12, 14), 0.049),
((7, 13), 0.072),
((2), 0.121),
((9, 11), 0.185)]
--
View this message in context:
http://www.nabble.com/Bucketing-Grouping-Probabilities-tp20582544p20583699.html
Many Thanks! It's a good start for me.
Slight typo in your reply as should be
x <- c(0.049, 0.129, 0.043, 0.013, 0.015, 0.040, 0.066,
0.038, 0.2040, 0.0221, 0.234, 0.0443, 0.0684, 0.035)
.
.
.
This gives me
old new
1 0.0490 0.04155
2 0.1290 0.12900
3 0.0430 0.04155
4 0.013
Cross posting is sociopathic. The Oja median _is_ robust in
several reasonable senses, but admittedly not from a breakdown
perspective. There are several other options: for a good review
see, e.g. Multivariate Median, A. Niinimaa and H. Oja
Encyclopedia of Statistical Sciences
url:www.eco
Apologies Roger, if you find anything wrong with the mail.
Thanks for the reference Roger.
IS there anything else which I can look at, say something in R itself?
Regards and thanks once again
Rahul Agarwal
Analyst
Equities Quantitative Research
UBS_ISC, Hyderabad
On Net: 19 533 6363
-
I nominate:
On Wed, Nov 19, 2008 at 12:18 PM, roger koenker <[EMAIL PROTECTED]> wrote:
> Cross posting is sociopathic.
--
Sarah Goslee
http://www.functionaldiversity.org
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-hel
On Wed, 2008-11-19 at 09:33 -0500, David M Warner wrote:
> Greetings all
> The help file for GAMM in mgcv indicates that the log likelihood for a
> GAMM reported using
>
> summary(my.gamm$lme) (as an example) is not correct.
It is slightly more specific than that. It mentions that glmmPQL was
us
How to get robust M-estimators of multivariate scatter using Huber's psi?
Which package/function should I look into? Ideally, I hope I can
self-define thresholds of Huber's psi function.
Thanks a lot!!!
--
View this message in context:
http://www.nabble.com/How-to-get-robust-M-estimator-of-mult
I am the author of the 'fame' package, and I can confirm that earlier versions
did indeed use Greg Warnes addLast() function to add to the user's .Last()
function. The current version no longer does so.
Jeff
Dan Slayback <[EMAIL PROTECTED]> writes:
> Thanks very much for the tips. Simply remo
Faheem Mitha wrote:
Hi Hans,
Thanks for the reply.
On Tue, 18 Nov 2008, Hans Werner Borchers wrote:
Faheem Mitha email.unc.edu> writes:
Hi,
Does anyone know of an R ORM (Object Relational Mapper)? I'm thinking of
something similar to sqlalchemy (http://www.sqlalchemy.org/).
Alternative
Dear all,
A quick question which I somehow cannto figure out: I want to apply
the function "any" to subsets of a dataset in order to create a vector
with TRUE/FALSE values, depending on whether a subset has the number
5. I.e.,
y <- matrix(c(1,2,3,3,4,5,5,6,6,7,5,1,1,3,5,NA,5,1,1,3),ncol=2)
> y
Hi All,
I am iterating through dated materials, with variable start and end dates,
and would like to skip procedures everytime I encounter a weekend or
holiday. To do this, I thought the easiest way would be to create a
TRUE/FALSE vector corresponding to each day where it is TRUE if a workday,
an
Try this:
sapply(tapply(y[,2],na.omit(y[,1]), `==`, 5), any)
On Wed, Nov 19, 2008 at 4:47 PM, Stephan Lindner <[EMAIL PROTECTED]> wrote:
>
> Dear all,
>
>
> A quick question which I somehow cannto figure out: I want to apply
> the function "any" to subsets of a dataset in order to create a vecto
Stephan
Try:
tapply(y[,2], y[,1], function(x) any(x==5))
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Stephan Lindner
> Sent: Thursday, 20 November 2008 7:48 a.m.
> To: [EMAIL PROTECTED]
> Subject: [R] tapply and any
>
>
> De
Have you looked at the obvious Task View yet?
http://cran.r-project.org/web/views/Robust.html
--
David Winsemius
On Nov 19, 2008, at 1:07 PM, rlearner309 wrote:
How to get robust M-estimators of multivariate scatter using Huber's
psi?
Which package/function should I look into? Ideally
On Wed, 19-Nov-2008 at 08:25AM -0500, Matt Cook wrote:
> I am having difficulties installing the RMySQL package (0.6-1) on a
> clean install of pclinuxos with R version 2.5.1. My version of the OS
> came with R-base already installed along the RKWard GUI front end.I have
> attempted to install
On Wed, Nov 19, 2008 at 12:54 PM, Brigid Mooney <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am iterating through dated materials, with variable start and end dates,
> and would like to skip procedures everytime I encounter a weekend or
> holiday. To do this, I thought the easiest way would be to cr
Yes I did. But the closest I found is the covMest function in rrcov package,
which uses biweight function, which is rescending. Unfortunately, I need
to use Huber's psi function to derive multivariate scatter, and I hope I can
try different thresholds.
Any help? Thanks a lot!!!
David
I am hoping that some one might be to tell me whether there are any
functions that produce influence measures for lme /nlme objects (i.e those
suggested by Lesaffre and Verbeke or Langford and Lewis for multilevel
models).
Thanks in advance.
---
Dear all,
I was wondering if someone could help me with the specification of a
formula including both nested and crossed effects in the same model in
lmer. I have one predictor variable, x, and three grouping factors,
a,b and c. Factor b is nested in a but is partially crossed with c.
Also, I'm in
chron has some facilities for this that also work with "Date" class:
library(chron)
startDate <- as.Date("2008-08-15")
endDate <- as.Date("2008-09-15")
AllDays <- seq(startDate, endDate, by="day")
Holidays <- as.chron(as.Date("2008-09-01"))
is.workday <- !is.holiday(AllDays, Holidays) & !is.weeken
Dear all,
I was wondering if someone could help me with the specification of a
formula including both nested and crossed effects in the same model in
lmer. I have one predictor variable, x, and three grouping factors,
a,b and c. Factor b is nested in a but is partially crossed with c.
Also, I'm in
Hi there
I know, I'm sure you discussed this stuff 100 times, but I really have
a basic understanding problem, if and how do I create a
multidimensional array in R. I'm coming from MATLAB and there it's as
easy as you ever could imagine.
Ok, so, I want to have an array, where I can fill i
Dear all,
I was wondering if someone could help me with the specification of a
formula including both nested and crossed effects in the same model in
lmer. I have one predictor variable, x, and three grouping factors,
a,b and c. Factor b is nested in a but is partially crossed with c.
Also, I'm in
Stefan Evert wrote:
>
> On 19 Nov 2008, at 07:56, Prof Brian Ripley wrote:
>
>>> I just read an announcement saying that Mathematica is launching a
>>> version working with Nvidia GPUs. It is claimed that it'd make it
>>> ~10-100x faster!
>>> http://www.physorg.com/news146247669.html
>>
>> Well,
On Wed, Nov 19, 2008 at 1:37 PM, Eduardo G. Martins <[EMAIL PROTECTED]> wrote:
> Dear all,
> I was wondering if someone could help me with the specification of a
> formula including both nested and crossed effects in the same model in
> lmer. I have one predictor variable, x, and three grouping fa
Gabor Grothendieck wrote:
There are the timeDate and timeSeries packages with very powerful
possibilities to handle weekdays, weekends and public holidays for the
G7 countries and CH. You can create your own holiday calenders for many
countries including fix and moveable holidays.
Note, this
Using rbinom might be more clear than my sample() solution. May I
speculate without actual testing that:
inv <- 2*rbinom(length(vec),1,0.5) - 1
might be more efficient than a 2-step rbinom / ifelse strategy?
--
David Winsemius
Heritage Labs
On Nov 18, 2008, at 5:21 PM, joris meys wrote:
T
Look in robustbase; it has a psiFunc class.
On Nov 19, 2008, at 2:26 PM, rlearner309 wrote:
Yes I did. But the closest I found is the covMest function in rrcov
package,
which uses biweight function, which is rescending. Unfortunately,
I need
to use Huber's psi function to derive multiv
David,
Your examples assume gaussian errors and an identity link, so in this case
your GAMMs are just linear mixed models and the likelihoods are fine. (This
would not have been the case for non-gaussian errors and/or non-identity
link, when PQL would have been used for fitting and the `likelih
Rainer M Krug wrote:
Hi
I looked in the "writing R extensions" and also into package.skeleton,
but could not find anything:
I am looking for a skeleton or simple example on how to create a
package which contains C++ code.
I only want to implement one function, so nothing complicated. The
idea
On Wed, Nov 19, 2008 at 9:16 AM, Björn Stollenwerk
<[EMAIL PROTECTED]> wrote:
> Thanks! I am talking about any kind of model comparison technique.
>
> However, some p-values based on F-Tests are supplied, based on the GLMM with
> Gamma distribution and log-link function (see output below). I think
On Tue, Nov 18, 2008 at 6:19 AM, tedzzx <[EMAIL PROTECTED]> wrote:
> Hi,all:
> I am running a nonlinear regression and there is a problem.
Yes. The problem is that there is a singular gradient matrix at the
initial parameter estimates. You will need to modify your function or
your initial param
On 20/11/2008, at 8:51 AM, Michael Zak wrote:
Hi there
I know, I'm sure you discussed this stuff 100 times, but I really have
a basic understanding problem, if and how do I create a
multidimensional array in R. I'm coming from MATLAB and there it's as
easy as you ever could imagine.
Ok, so, I
Oliver Bandel first.in-berlin.de> writes:
>
> It seems, at this R-mailing list some poeple are somehow arrogant and
> ignorant,
> not looking for doing things better.
>
> Ciao,
>Oliver
>
Perhaps you would be willing (in the spirit of improving
things) to go to
http://gmane.org/info.php
Dear R users,
I would like to simulate, for 2 replications, an autoregressive process:
y(t)=0.8*y(t-1)+e(t) where e(t) is i.i.d.(0,sigma*sigma),
Thank you in advance
Ãcoutez gratuitement le nouveau single de Noir Désir et découvrez d'au
Hi R users,
Is there a way to simplify this instruction:
ifelse(B=="0","A",
ifelse(B=="1","A",
ifelse(B=="2","A",
ifelse(B=="3","A",
ifelse(B=="4","A",
ifelse(B=="5","A",
ifelse(B=="6","A",
ifelse(B=="7","A",
ifelse(B=="8","A",
ifelse(B=="9","A","B"))
i am looking for something like this
Dear CE.KA,
Try this:
B=0:12
> B
[1] 0 1 2 3 4 5 6 7 8 9 10 11 12
> ifelse(B%in%c(0,9),'A','B')
[1] "A" "B" "B" "B" "B" "B" "B" "B" "B" "A" "B" "B" "B"
HTH,
Jorge
On Wed, Nov 19, 2008 at 4:42 PM, CE.KA <[EMAIL PROTECTED]> wrote:
>
> Hi R users,
>
> Is there a way to simplify thi
?arima.sim
On Wed, 19 Nov 2008, [EMAIL PROTECTED] wrote:
Dear R users,
I would like to simulate, for 2 replications, an autoregressive process:
y(t)=0.8*y(t-1)+e(t) where e(t) is i.i.d.(0,sigma*sigma),
Thank you in advance
??coutez gra
I'm sorry, a typo:
> B=0:12
> B
[1] 0 1 2 3 4 5 6 7 8 9 10 11 12
> ifelse(B%in%c(0:9),'A','B')
[1] "A" "A" "A" "A" "A" "A" "A" "A" "A" "A" "B" "B" "B"
HTH,
Jorge
On Wed, Nov 19, 2008 at 5:16 PM, Jorge Ivan Velez
<[EMAIL PROTECTED]>wrote:
>
> Dear CE.KA,
>
> Try this:
>
> B=0:12
>
On 20/11/2008, at 10:54 AM, [EMAIL PROTECTED] wrote:
Dear R users,
I would like to simulate, for 2 replications, an autoregressive
process: y(t)=0.8*y(t-1)+e(t) where e(t) is i.i.d.(0,sigma*sigma),
Thank you in advance
?arima.sim
Note to R-core: This is actually rather hard for a neo
On Wed, 19 Nov 2008 21:49:54 + (UTC),
Ben Bolker <[EMAIL PROTECTED]> wrote:
[...]
> Perhaps you would be willing (in the spirit of improving things) to
> go to
> http://gmane.org/info.php?group=gmane.comp.lang.r.general&edit=t
> and specify some information so that the Gmane people can ch
Hi Siyi!
My answer is late but I hope that it is not too late.
On Friday 13 June 2008 16:04, Siyi FENG wrote:
> Hello! When I tried to call Front41 in R, I met some problem. After I
> entered: system ('front41.exe'), an error occured :
>
> "jwe0019i-u The program was terminated abnormally wit
Dear R people,
what functions generate respectively vectors with each element is respectively
zero and one.
sorry for my credulous questions and many thanks in advance.
Ãcoutez gratuitement le nouveau single de Noir Désir et découvrez d'au
On 20/11/2008, at 11:47 AM, [EMAIL PROTECTED] wrote:
Dear R people,
what functions generate respectively vectors with each element is
respectively zero and one.
sorry for my credulous questions and many thanks in advance.
If you want a *random* (i.i.d.) vector of zeroes and ones, then the
On Monday 17 November 2008 21:24, Yang Wan wrote:
> (1) With previous problem, I have tried the way you suggested, but I
> still cannot do the tests. The problem here is that both {bgtest} and
> {bptest} in package [lmtest] need a formula in their arguments as
> follows,
>
> bgtest(formula, order =
Dear Rolf, thank you for reply,
I am interested with non random numbers. To be more precise, I would like to
obtain two vectors a and b with a=(1,1,1,..,1,1) and b=(0,0,,0,0).
The length of a and b is 1.
Thank you
Ãcoutez gra
a <- rep(1, 1) , see ?rep
[EMAIL PROTECTED] wrote:
Dear Rolf, thank you for reply,
I am interested with non random numbers. To be more precise, I would like to
obtain two vectors a and b with a=(1,1,1,..,1,1) and b=(0,0,,0,0).
The length of a and b is 1.
Thank you
With this data
x <- c(0,0,1,1,2,2)
y <- c(5,6,4,3,2,6)
lwr <- y-1
upr <- y+1
xlab <- c("Low","Low","Med","Med","High","High")
mydata <- data.frame(x,xlab,y,lwr,upr)
I would like to make a dot plot and use lwr and upr as error bars.
Above 0=Low. I would like there to be
some space between the 5 a
Do ?position_jitter
You will see why the error message "unused arguments" is happening in your
example.
- Original message -
From: "Juliet Hannah" <[EMAIL PROTECTED]>
To: r-help@r-project.org
Date: Wed, 19 Nov 2008 18:34:36 -0500
Subject: [R] ggplot2; dot plot, jitter, and error bars
W
in addition to %in% and depending on what the general principle behind the
setup is:
you may want to have a look into switch (e.g. if there happen to be "C"s
and "D"s...).
or, of course you can check for B being between 0 and 9 rather than being the
respective integers:
ifelse ((B > 0) && (B
Thanks again for the message.
Tried to figure out but failed...
I don't understand how to modify the \psi and combine it to covMest... Sorry
for my poor programming skills.
Can anyone give me some hints?
Thanks a lot!
Ted
David Winsemius wrote:
>
> Look in robustbase; it has a psiFunc class.
I'm trying to get started with maximum likelihood estimation with a
simple regression equivalent out of Bolker (Ecological Models and Data
in R, p302).
With this code:
#Basic example regression
library(bbmle)
RegData<-data.frame(c(0.3,0.9,0.6),c(1.7,1.1,1.5))
names(RegData)<-c("x", "y")
linregfun
Rice, Cliff G (DFW) wrote:
I'm trying to get started with maximum likelihood estimation with a
simple regression equivalent out of Bolker (Ecological Models and Data
in R, p302).
With this code:
#Basic example regression
library(bbmle)
RegData<-data.frame(c(0.3,0.9,0.6),c(1.7,1.1,1.5))
names(Reg
Jorge Ivan Velez wrote:
>
>> B=0:12
>> B
>>
> [1] 0 1 2 3 4 5 6 7 8 9 10 11 12
>
>> ifelse(B%in%c(0:9),'A','B')
>>
> [1] "A" "A" "A" "A" "A" "A" "A" "A" "A" "A" "B" "B" "B"
>
>
given the example, the solution would rather be
if (B %in% as.character(0:9)) "A" else "B"
On Wed, Nov 19, 2008 at 5:34 PM, Juliet Hannah <[EMAIL PROTECTED]> wrote:
> With this data
>
> x <- c(0,0,1,1,2,2)
> y <- c(5,6,4,3,2,6)
> lwr <- y-1
> upr <- y+1
> xlab <- c("Low","Low","Med","Med","High","High")
> mydata <- data.frame(x,xlab,y,lwr,upr)
>
> I would like to make a dot plot and use
I am running a logistic regression model with a random effect using lmer. I
am uncertain how to check for collinearity between my parameters. I have
already run cor() and linear regression for each combination of parameters, and
all Rsqr values were <0.8
.but I am analyzing ecological data
Many thanks for the answers on my previous question, it got me started.
Indeed, stack() was the function I was vaguely remembering.
However, I didn¹t get very far because my data set is way more complicated
then I expected. In fact I have a mixture of levels and lists within a list.
Basically, it
Take a look at vif in the package car.
On Wed, Nov 19, 2008 at 10:00 PM, Crystal McRae <[EMAIL PROTECTED]> wrote:
>
>
> I am running a logistic regression model with a random effect using lmer. I
> am uncertain how to check for collinearity between my parameters. I have
> already run cor() an
On Nov 19, 2008, at 8:38 PM, Wacek Kusnierczyk wrote:
Jorge Ivan Velez wrote:
B=0:12
B
[1] 0 1 2 3 4 5 6 7 8 9 10 11 12
ifelse(B%in%c(0:9),'A','B')
[1] "A" "A" "A" "A" "A" "A" "A" "A" "A" "A" "B" "B" "B"
given the example, the solution would rather be
if (B %in% as.chara
The issue worrying Wacek was presumably the fact that
the original poster was treating the ``B'' variable as
being character, rather than numeric.
So (presumably) what he *really* wanted to say was
(something like)
ifelse(B%in%as.character(0:9),"A","B")
Of course this is sheer pedantry. I'm s
Hi,
I have a vector with lots of NAs. e.g.
vec = c(NA, NA, 2, NA, NA, 5, NA, 6, NA)
> vec
[1] NA NA 2 NA NA 5 NA 6 NA
I would like to replace NAs with their immediately previous non NA number.
After replacement, the above vector will become
> vec
[1] 0 0 2 2 2 5 5 6 6.
I understand how to
Hello,
I was using the mantelhaen.test function (2x2 J tables for
conditional independence testing). I noticed that the option for the
continuity correction (correction=T or correction=F) sometimes made a
difference while sometimes it did give the same results regardless of
correction=T or corre
See na.locf in the zoo package.
On Wed, Nov 19, 2008 at 10:59 PM, jeffc <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a vector with lots of NAs. e.g.
> vec = c(NA, NA, 2, NA, NA, 5, NA, 6, NA)
>> vec
> [1] NA NA 2 NA NA 5 NA 6 NA
>
> I would like to replace NAs with their immediately previous n
Dear Jeff,
Take a look at this post:
http://www.nabble.com/replacing-Na%27s-in-a-vector-with-the-preceding-integer-element-td20484941.html#a20484941
HTH,
Jorge
On Wed, Nov 19, 2008 at 10:59 PM, jeffc <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a vector with lots of NAs. e.g.
> vec = c(NA,
*Hi all,
I know this is probably basic, but I have proven to be a slow learner in any
programming language. Anyhow,
how can I calculate the SD for each person in my table? I have two patients
in this R data.frame, 7200 and 23955.
I extracted this from a relational database, but am I better off
Dear pufftissue,
If your data set is a data.frame called 'x', one approach could be:
# Data set
x=read.table('clipboard',header=TRUE)
# Calculations
tapply(x$HR,x$SUBJECT_ID,sd,na.rm=TRUE)
720023955
16.39977 10.03896
See ?tapply and/or ?ave for more information.
HTH,
Jorge
On Wed, N
How about:
with(dat, tapply(HR, SUBJECT_ID, sd))
Assuming your data frame is named dat.
On Wed, 2008-11-19 at 23:59 -0500, pufftissue pufftissue wrote:
> *Hi all,
>
> I know this is probably basic, but I have proven to be a slow learner in any
> programming language. Anyhow,
> how can I calcu
This is a bug. It has now been fixed in the R-forge source.
I will be updating the package in the next week or so with about a dozen
more indicators, as well as some additional features. At that point I will
push the change to CRAN.
Thanks,
Jeff
Chris-672 wrote:
>
> Trying to plot ATR of tim
The previous solutions assume you are only interested in one small interval,
but if your original example is just a simplified version, and the real
problem is multiple, possibly large, intervals, you might want to try
something like this:
c(NA,"A","B")[1+findInterval( <>, c(0,9+1) ) ]
which
Hi,
Does anyone read Verbeek's "A Guide to Modern Econometrics"? In its Section
4.11, how does the last two equations' HAC calculate? I've tried several
groups of parameters in sandwich::NeweyWest, but I still cannot get the same
result. I've tried lag=2 and lag=3, as long as prewhite=FALSE and
pre
1 - 100 of 102 matches
Mail list logo