Example not reproducible. Communication fail. Please refer to Posting Guide.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Hi R’lers,
I’m running into speeding issues, performing a bunch of
„gsub(patternvector, [token],dataframe$text_column)"
on a data frame containing >4millionentries.
(The “patternvectors“ contain up to 500 elements)
Is there any better/faster way than performing like 20 gsub commands in a row
Hi Dr. Therneau,
Yes, -log(sfit$surv) gives me the cumulative hazard but not the baseline
cumulative hazard. I know that Nielsen and Klein have SAS Macros to get
such estimates by using EM approach. I'm wondering if I can obtain the
baseline hazard estimates from coxph() for gamma frailty model si
Original Message
Subject: Re: How to obtain nonparametric baseline hazard estimates in the gamma
frailty model?
Date: Mon, 04 Nov 2013 17:27:04 -0600
From: Terry Therneau
To: Y
The cumulative hazard is just -log(sfit$surv).
The hazard is essentially a density estimate, and
Hi Dr. Therneau,
Thanks very much for your kind help! Does survfit() just give me the
survival curve? What I wanted is the baseline hazard estimates, i.e.,
lambda_{0} (t). How can I obtain this estimate from coxph()? Or using
basehaz()?
Thanks,
YH
On Mon, Nov 4, 2013 at 5:29 PM, Terry T
On 11/03/2013 05:00 AM, r-help-requ...@r-project.org wrote:
I can easily get the other parameter estimates by using coxph() but don't
know how to get the baseline hazard estimates from it. Does anyone know how
to obtain nonparametric baseline hazard estimates in the gamma frailty
model?
Thanks
Hi,You could use:
dat1 <- structure(list(Haplotype = c("H1", "H1", "H1", "H2", "H2", "H2",
"H3", "H3", "H3", "H4", "H4", "H4", "H4", "H4", "H4"), Frequency = c(0.8278,
0.02248, 0.1494, 0.8238, 0.02248, 0.1497, 0.1497, 0.02248, 0.8244,
0.628, 0.02248, 0.1483, 0.1637, 0.01081, 0.01798)), .Names =
Hello,
Does anyone know how to obtain nonparametric baseline hazard estimates in
the gamma frailty model by using coxph()? I can easily get the other
parameter estimates by using coxph() but don't know how to get the baseline
hazard estimates from it.
Thanks,
YH
[[alternative HTML versio
On Mon, 04 Nov 2013 20:26:46 +0100, David Winsemius
wrote:
On Nov 4, 2013, at 11:03 AM, Lorenzo Isella wrote:
Thanks.
I had already introduced this minor adjustments in the code, but the
real problem (to me) is the information that gets lost: the informative
name of the columns, the in
As a general rule, the distribution functions that start with p (e.g.
pnorm, pexp, pgamma, ...) will transform a random variable from the
corresponding distribution to a uniformly distributed random variable.
The functions that start with q (e.g. qnorm, qexp, qgamma, ...) will
transform a uniform
On Sat, Nov 2, 2013 at 11:12 AM, Martin Morgan wrote:
> On 11/01/2013 08:22 AM, Magnus Thor Torfason wrote:
>
>> Sure,
>>
>> I was attempting to be concise and boiling it down to what I saw as the
>> root
>> issue, but you are right, I could have taken it a step further. So here
>> goes.
>>
>> I
Hello,
At an R prompt type
?rexp
Also, read An Introduction to R, file R-intro.pdf that comes with your
distribution of R, namely, chapter 8 Probability distributions.
Hope this helps,
Rui Barradas
Em 04-11-2013 19:14, b. alzahrani escreveu:
Hi guys
Given a exponential curve, is there a
Hi guys
Given a exponential curve, is there any function on r that can generate
exponential distributed random numbers?
in General I want an function that can transform one probability distribution
into another??
Regards
**
Ba
On Nov 4, 2013, at 11:03 AM, Lorenzo Isella wrote:
> Thanks.
> I had already introduced this minor adjustments in the code, but the real
> problem (to me) is the information that gets lost: the informative name of
> the columns, the indicator type and the units.
Maybe you should use their "dow
Thanks.
I had already introduced this minor adjustments in the code, but the real
problem (to me) is the information that gets lost: the informative name of
the columns, the indicator type and the units.
Cheers
Lorenzo
On Mon, 04 Nov 2013 19:52:51 +0100, Rui Barradas
wrote:
Hello,
If
On Nov 4, 2013, at 11:52 AM, Nicolas Gutierrez
wrote:
> Hi All,
>
> I'm trying to run an ADMB function on R for Mac and need to find a substitute
> for the Windows command shell(). I tried system() but I get the following
> message:
>
>> system(ADMBFile)
> /bin/sh: /Users/nicolas/Desktop/SPE
Hello,
If you want to get rid of the (bp) stuff, you can use lapply/gsub. Using
Jean's code a bit changed,
library(XML)
mylines <- readLines(url("http://bit.ly/1coCohq";))
closeAllConnections()
mytable <- readHTMLTable(mylines, which = 2, asText=TRUE,
stringsAsFactors = FALSE)
str(mytable)
This looks like R FAQ 7.31, the one so commonly asked that regulars on
this list have its number memorized!
> tau<-seq(0.02,0.98,0.02)
> match(round(0.12, 2), round(tau, 2))
[1] 6
> match(round(0.16, 2), round(tau, 2))
[1] 8
See also ?all.equal
Sarah
On Mon, Nov 4, 2013 at 1:29 PM, Timo Schmid
On Nov 4, 2013, at 9:52 AM, Nicolas Gutierrez wrote:
> Hi All,
>
> I'm trying to run an ADMB function on R for Mac and need to find a substitute
> for the Windows command shell(). I tried system() but I get the following
> message:
>
>> system(ADMBFile)
> /bin/sh: /Users/nicolas/Desktop/SPE/L
Hi All,
I'm trying to run an ADMB function on R for Mac and need to find a substitute
for the Windows command shell(). I tried system() but I get the following
message:
> system(ADMBFile)
/bin/sh: /Users/nicolas/Desktop/SPE/LBSPR_ADMB/L_AFun.exe: cannot execute
binary file
Any hints please?
R FAQ 7.31 .
-- Bert
On Mon, Nov 4, 2013 at 10:29 AM, Timo Schmid wrote:
> Hello,
> I want to match specific numbers and a vector. Therefore I use the match or
> which function but I get unreasonable results. Has anybody an idea why I got
> a NA inmatch(0.12, tau)Please see the code below:
>
>
Hello,
I want to match specific numbers and a vector. Therefore I use the match or
which function but I get unreasonable results. Has anybody an idea why I got a
NA inmatch(0.12, tau)Please see the code below:
> tau<-seq(0.02,0.98,0.02)
> tau
[1] 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.
MEDIATION ANALYSIS WITH R
I have tried to do a mediation analysis
In my dataset I did not use a treatment. If i write treatment = NULL the
program sends me back a error. How i can do this?
R> model.m <- lm(job_seek ~ treat + depress1 + econ_hard + sex + age
+ occp + marital + nonwhite + educ +
Hi,
I'm not able to get information about the following question:
is the variables standardization a default option in manova() (stats package)?
Or if you want to compare variables with different units or scales and
rather different variances, you have to previously standardize the
variables ?
Th
On 11/4/2013 9:18 AM, arun wrote:
Hi,
This gives an error.
glm(cbind(O3, temp) ~ ., data=ozone)
Error in x[good, , drop = FALSE] : (subscript) logical subscript too long
lm(cbind(O3, temp) ~ ., data=ozone) #works
Right. With no family= specified, lm() is equivalent to what I meant.
If th
Breaking up the task is an excellent way
of thinking.
John's solution is probably simplest in the
short run but not necessarily best in the
long run.
How I'd do it is write a function for each
of your three tasks and then have a script
to call the functions. There would be two
source files: one
thanks Jim, I have tried it but still the same error :/
On Mon, Nov 4, 2013 at 7:34 AM, Jim Holtman wrote:
> Is this an .xlsx file format? If so convert to .xls and try again.
> .xlsx is compressed and takes a lot more resources in XLConnect
>
>
> Sent from my Verizon Wireless 4G LTE Smartphon
Is this an .xlsx file format? Â If so convert to .xls and try again. Â .xlsx
is compressed and takes a lot more resources in XLConnect
Sent from my Verizon Wireless 4G LTE Smartphone
Original message
From: Baro
Date: 11/04/2013 09:26 (GMT-05:00)
To: "Adams, Jean"
Cc: R
Hi Lorenzo,
Perhaps package "pxR" can help you out.
http://cran.at.r-project.org/web/packages/pxR/index.html
pxR: PC-Axis with R
The pxR package provides a set of functions for reading and writing PC-Axis
files, used by different statistical organizations around the globe for
data dissemination.
That would be:
MyAnova$"Pr(>F)"
and since that is an Anova table, you actually only need the first value:
MyAnova$"Pr(>F)"[1]
Hope this helps,
Adrian
On Mon, Nov 4, 2013 at 4:10 PM, Anders Tisell wrote:
>
> Hi,
>
> I have created a mixed linear model with one fixed factor and two
> random fact
Hi David (and everyone)
Thank you for your reply.
I see I copied down the code wrong for the regression. I was using the
"+" seperator, and not ",". The regression was working.
I made a mistake with the NEWDATA, where I also used "+", instead of
",", however I see both work but return very
You'll need to add quotes
MyAnova$"Pr(>F)"
Or use the bracket notation
MyAnova[, "Pr(>F)"]
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderl
Hi,
Using ?gsub()
gsub("[^0-9]+"," ",a$Col1)
#or
gsub("[^0-9]+(,|/|)"," ",a$Col1)
library(stringr)
dat <- read.table(text=str_trim(gsub("[^0-9]+(,|/|)"," ",a$Col1)),sep="")
A.K.
On Monday, November 4, 2013 2:22 AM, "mohan.radhakrish...@polarisft.com"
wrote:
Please ignore. This works
Dear all
I've tried a spatial capture-recapture in SPACECAP package but got stuck
after uploading the input data files:
"Error in animal capture details file - non-integer or missing values"
Error in if (locso[loc, so + 3] == 0) { :
missing value where TRUE/FALSE needed
I prepared the input c
Hi,
This gives an error.
glm(cbind(O3, temp) ~ ., data=ozone)
Error in x[good, , drop = FALSE] : (subscript) logical subscript too long
lm(cbind(O3, temp) ~ ., data=ozone) #works
R version 3.0.2 (2013-09-25)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_CA.UTF-8
Hi,
I have created a mixed linear model with one fixed factor and two
random factors then I would like to test if there is a significant
difference between the two groups.
To do this I calculate the model with the lmer function:
> MyModel <- lmer(...)
and do a anova of the model to estimate if
Hello,
And thanks a lot.
This is indeed very close to what I need.
I am trying to figure out how not to "lose" the headers and how to avoid
downloading labels like "(p)" together with the numerical data I am
interested in.
If anyone on the list knows how to make this minor modifications, s/he
thanks, I changed my code, but still have the same problem :/
On Mon, Nov 4, 2013 at 6:49 AM, Adams, Jean wrote:
> Perhaps the discussion at this link will help ... (see especially the
> second answer).
>
>
> http://stackoverflow.com/questions/7963393/out-of-memory-error-java-when-using-r-and-x
Perhaps the discussion at this link will help ... (see especially the
second answer).
http://stackoverflow.com/questions/7963393/out-of-memory-error-java-when-using-r-and-xlconnect-package
Jean
On Mon, Nov 4, 2013 at 8:26 AM, Baro wrote:
>
> thanks alot, but now I have another problem: my Exc
Thanks John,
It works. (just saved source and clicked "Source" to run it, without
debug(?)).
Best
Chris
-Ursprüngliche Nachricht-
Von: John Kane [mailto:jrkrid...@inbox.com]
Gesendet: Montag, 4. November 2013 14:09
An: csvirt...@gmx.de; r-help@r-project.org
Betreff: RE: [R] Newbie Questi
thanks alot, but now I have another problem: my Excel file is very big and
I get this error, which says:
Error: OutOfMemoryError (Java): Java heap space
Is there any way to read each value one by one and save them in an array?
On Mon, Nov 4, 2013 at 6:13 AM, Adams, Jean wrote:
> You can use t
Hi Jim,
thanks for the answer! I toyed around as you said and now they look cool and
sexy! many thanks!
Do you know if there is a way to compress a bit the output? The image type of
functions have the useRaster parameter to set to have a "compressed" output.
Right now the produced plots are aro
Hi John,
On Mon, Nov 4, 2013 at 8:25 AM, John Kane wrote:
> As a starting point perhaps have a look at legend.key.size (unit)
> in ?theme.
That will change the size of the legend key, not the size of the
aesthetics inside the legend. For that you need to use override.aes in
guide_legend, as I pr
You can use the XLConnect package to read in a range of rows and columns,
then define a function to subset the odd rows. For example,
library(XLConnect)
wb <- loadWorkbook("C:/temp/MyData.xls")
dat <- readWorksheet(wb, sheet=getSheets(wb)[1], startRow=1, endRow=139,
startCol=5, endCol=5)
dat <- r
Dear list,
I'd like to create a visual plot of a clmm() I've fitted using the
'ordinal' package in R. It's possible to do this with a glm() by using
the 'effects' package. For example:
library(effects)
data(BEPS)
mod <- lm(political.knowledge ~ age + gender + vote, data=BEPS)
eff
Take a look at the "XLConnect" package. I use it for all the
reading/writing for Excel files.
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Mon, Nov 4, 2013 at 8:47 AM, Baro wrote:
> Hi experts,
>
> I
Lorenzo,
You might want to post this is a new question to get some new eyes on it.
Or, you could try posting your question to http://stackoverflow.com/.
Scraping the web is a common topic for that group.
Jean
On Mon, Nov 4, 2013 at 3:53 AM, Lorenzo Isella wrote:
> Hello,
> And thanks a lot.
It's not clear exactly what you mean by 'automate' but you can simplify
a bit by fitting a multivariate linear model to all the responses
together, and using . on the RHS of the formula to represent all
other variables in the data set as independent variables,
m.all <- glm(cbind(O3, temp) ~ .,
Hi experts,
I want to read data from an excel data like this:
for the fifth column, from first row until 140 but only 1,3,5,7,.139
(only 70 values),
How can I do it in R?
thanks
[[alternative HTML version deleted]]
__
R-help@r-project.
As a starting point perhaps have a look at legend.key.size (unit)
in ?theme. It may do something like what you want with some tweaking. My
quick and dirty example just applies the command to both legends.
pl<-ggplot(dat1,aes(x=Importance,y=Performance,fill=PBF,size=gapsize))+
geom_point
Just type the commands in the Source window of RStudioo, debug, save as a .r
file and source it.
I don't see any particular reason to have three scripts once everything is
running correctly but you may find it useful.
John Kane
Kingston ON Canada
> -Original Message-
> From: csvirt
Yes, I'm pretty familiar with igraph, but had not thought of using it
for this. Interesting idea.
So I presume I'd do something like (pseudocode):
:Create igraph object from my data set as an edgelist
:Create a list of connected subgraphs using clusters()
:Loop through that list of clusters to
On 11/1/2013 10:12 PM, Martin Morgan wrote:
Do you mean that if A,B occur together and B,C occur together, then A,B
and A,C are equivalent?
Yes, that's what I meant, sorry, typo.
I like your uid() function. It avoids the 20M times loop, and the issue
of circular references can be solved by
Pretty much exactly what it says. Now, keep in mind that a "warning" message
does not indicate a failure or error. Presumably you successfully read your
file into "filedata." What it's saying is that the character exists
inside some character string in one of the elements of your file. Whethe
Hi,
I changed the code. The first two curves seem to plot properly without
the 'ylim'. 'ylim' doesn't allow the first two curves to plot properly.
It doesn't have any effect on the 3rd curve.
plot(data$Time,as.numeric(data$Used),ylim=c(min(as.numeric(data$Used)),max(data$Max)),col="green",pch=1
There are around 16M unique values. After accounting for equivalence,
the number is much smaller (I don't know how much smaller, since my
program has not completed yet :-)
Yes, I meant that "B and C are also equivalent". The original version
was a typo.
Best,
Magnus
On 11/1/2013 3:45 PM, ji
On 11/04/2013 08:54 PM, mohan.radhakrish...@polarisft.com wrote:
Hi,
When I plot 3 curves with the same x-axis and same y-axis, the first two
curves honor the y-axis but the last one doesn't. When I remove yaxt="n"
for the last curve a new scale appears on the y-axis along with the scales
that t
Thank you so much for your explanation.
I might be in a trouble again with processing log-likelihood analysis.
If it happens, may I ask your instuctions next time?
--
View this message in context:
http://r.789695.n4.nabble.com/Comparison-of-two-weibull-distributions-tp4679632p4679680.html
Sen
On 11/04/2013 08:09 PM, Alaios wrote:
Hi Jim Lemon,
thanks for the help, I appreciate this.
right now my code looks like.
par(mar=c(5,4,4,5))
color2D.matplot(data,1,c(0,1),0,xlab="",ylab="Spans",
main="color.scale",xrange=c(-110,-50),border=NA,axes=F)
color.legend(357,30,370,100,seq(-110,-50,l
Hi,
When I plot 3 curves with the same x-axis and same y-axis, the first two
curves honor the y-axis but the last one doesn't. When I remove yaxt="n"
for the last curve a new scale appears on the y-axis along with the scales
that the first two curves use. I want all curves to use the same y-axi
Hello mailing list,
I am new to R using RStudio in Windows and I just want to have repeated
tasks each day but could not find an answer to that reading a lot of intros,
scrolling through even more and reading on S.O.
I connect to a database, load data, do calculation, write results to the
Hi,
I'm using R version 3.0.2. While I executed the following command
filedata <- read.csv(file, header=TRUE, colClasses="character")
I got the warning message:
In scan(file, what, nmax, sep, dec, quote, skip, nlines, ... :
EOF within quoted string
I'd like to know what this means? And how s
Hi Jim Lemon,
thanks for the help, I appreciate this.
right now my code looks like.
par(mar=c(5,4,4,5))
color2D.matplot(data,1,c(0,1),0,xlab="",ylab="Spans",
main="color.scale",xrange=c(-110,-50),border=NA,axes=F)
color.legend(357,30,370,100,seq(-110,-50,length.out=13),
align="rb",rect.col=c
Dear all,
I am pleased to announce that the rmongodb package connecting R with the NoSQL
database mongodb is back to CRAN:
http://cran.r-project.org/web/packages/rmongodb/index.html
This release is a bug fix release to get the package back to CRAN.
I have overtaken the package maintenance from
On Nov 3, 2013, at 11:50 PM, kmmoon100 wrote:
> Hello everyone,
>
> I have been using bReeze package for weibull distribution analysis.
> In this package, there is a function called 'formatTS' for converting time
> stamps from string to POSIXlt.
> (http://rgm3.lab.nig.ac.jp/RGM/R_rdfile?f=bReeze
Hello everyone,
I have been using bReeze package for weibull distribution analysis.
In this package, there is a function called 'formatTS' for converting time
stamps from string to POSIXlt.
(http://rgm3.lab.nig.ac.jp/RGM/R_rdfile?f=bReeze/man/formatTS.Rd&d=R_CC)
This is a part of process to plot a
I want to estimate the effect of several independent variables on several
dependent
variables. In the example below I wanted to estimate the
effect of three independent variables on ozone and temperature. My aim is
to create a list of dependent and independent variables and automate the
process ra
67 matches
Mail list logo