Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-16 Thread Göran Broström
On 01/16/2014 04:59 PM, Vito Ricci wrote: Hi guys, is there in some R package a statement to fit parameters in a 3 parameters lognormal distribution. Yes, the function 'phreg' in the package 'eha'. Göran Broström Many thanks Vito Ricci [[alternative

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-17 Thread Göran Broström
rdì 17 Gennaio 2014 8:26, Vito Ricci ha scritto: Many thanks for your suggestion. Regards. VR Se non ora, quando? Se non qui, dove? Se non tu, chi? Il Giovedì 16 Gennaio 2014 22:31, Göran Broström ha scritto: On 01/16/2014 04:59 PM, Vito Ricci wrote:

Re: [R] Type III tests and Cox models

2014-01-20 Thread Göran Broström
On 01/20/2014 07:02 PM, peter dalgaard wrote: On 20 Jan 2014, at 18:47 , Terry Therneau wrote: The short summary: I was suspicious before, now I know for certain that it is misguided, and the phreg implementation of the idea is worse. A fortune candidate, if ever I saw one. OK, but please

Re: [R] My problem with R

2014-01-24 Thread Göran Broström
On 1/24/14 10:44 PM, Rolf Turner wrote: On 24/01/14 21:30, PIKAL Petr wrote: Why difference in the result? rbind and cbind function are something wrong? Or I, am something wrong? you are something wrong. Fortune? No. Göran cheers, Rolf __

[R] print.matrix

2014-01-30 Thread Göran Broström
Is this a bug in the documentation? R-3.0.2 on ubuntu 13.10. Göran Broström __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] proportional weights

2014-02-06 Thread Göran Broström
ct case weights, i.e., a weight of 2 is the same as including the corresponding item twice. I agree that the documentation is no wonder of clarity in this respect. Btw, note that, in your example, (0.1005269 / 0.07108323)^2 = 2, your constant weight. Göran Broström So what if I know a-prio

Re: [R] proportional weights

2014-02-06 Thread Göran Broström
- I hope this helps, John John Fox, Professor McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox/ On Thu, 6 Feb 2014 09:27:22 +0100 Göran Broström wrote: On 05/02/14 22:40, Marco Inacio wrote: Hello all, can hel

[R] data frame vs. matrix

2014-03-16 Thread Göran Broström
I have always known that "matrices are faster than data frames", for instance this function: dumkoll <- function(n = 1000, df = TRUE){ dfr <- data.frame(x = rnorm(n), y = rnorm(n)) if (df){ for (i in 2:NROW(dfr)){ if (!(i %% 100)) cat("i = ", i, "\n") dfr

Re: [R] data frame vs. matrix

2014-03-17 Thread Göran Broström
On 2014-03-16 23:56, Duncan Murdoch wrote: On 14-03-16 2:57 PM, Göran Broström wrote: I have always known that "matrices are faster than data frames", for instance this function: dumkoll <- function(n = 1000, df = TRUE){ dfr <- data.frame(x = rnorm(n), y = rnorm(n

Re: [R] data frame vs. matrix

2014-03-17 Thread Göran Broström
O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. On March 16, 2014 11:57:33 AM PDT, "Göran Broström"

Re: [R] data frame vs. matrix

2014-03-17 Thread Göran Broström
m all to a common type (often character), so it may give you the wrong result in addition to being unnecessarily slow. Bill Dunlap TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch Sent: Sunda

Re: [R] Simulating from the Weibull with right censoring

2014-03-24 Thread Göran Broström
On 2014-03-24 07:22, David Winsemius wrote: On Mar 23, 2014, at 9:14 PM, Lucy Leigh wrote: Hi everyone, I am currently attempting to simulate some survival data, based on a Weibull model. I basically need to simulate some survival data so that I can then test out a program I'm writing, befo

Re: [R] Simulating from the Weibull with right censoring

2014-03-24 Thread Göran Broström
On 2014-03-24 09:34, Göran Broström wrote: On 2014-03-24 07:22, David Winsemius wrote: On Mar 23, 2014, at 9:14 PM, Lucy Leigh wrote: Hi everyone, I am currently attempting to simulate some survival data, based on a Weibull model. I basically need to simulate some survival data so that I

Re: [R] How to obtain restricted estimates from coxph()?

2013-10-16 Thread Göran Broström
On 2013-10-16 14:33, Terry Therneau wrote: On 10/16/2013 05:00 AM, r-help-requ...@r-project.org wrote: 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). C

Re: [R] How to stop Kaplan-Meier curve at a time point

2013-11-26 Thread Göran Broström
utcome) dat.1 <- age.window(dat, c(0, 2190)) and 'dat.1' is your right-censored data set. Göran Broström On 11/21/2013 07:36 AM, Thomas Stewart wrote: One solution is to format the data as if the follow-up period ended on day 2190. For example, TTT <- Survival_days DDD <-

Re: [R] R- package for Parametric Survival Analysis with Left-censored data

2013-11-27 Thread Göran Broström
on, right censoring and and a choice of distributions. Göran Broström -- David Winsemius Alameda, CA, USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/

Re: [R] Small p-value good or bad?

2010-11-30 Thread Göran Broström
stinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Göran Broström __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] survreg vs. aftreg (eha) - the relationship between fitted coefficients?

2010-12-14 Thread Göran Broström
covariate vector. This is not (yet) reflected on the help page for aftreg, but has been discussed here earlier. Apparently, survreg still cannot fit such models. Both functions should be fitting the accelerated failure time (Weibull) model. However, as Göran Broström points out in the hel

Re: [R] ID parameter in model

2011-05-03 Thread Göran Broström
time at risk         17045 > Max. log. likelihood      -1390.8 > LR test statistic         17.2 > Degrees of freedom        1 > Overall p-value           3.3091e-05 >> > > __ > R-help@r-project.org mailing list > https://stat.e

Re: [R] ID parameter in model

2011-05-04 Thread Göran Broström
On Wed, May 4, 2011 at 2:18 PM, Mike Harwood wrote: > Thank you, Goran.  Please see the package details below: Thanks, I have uploaded a corrected version of eha to CRAN. Should be available soon. Göran [...] __ R-help@r-project.org mailing list http

Re: [R] predict 'expected' with eha package

2011-05-21 Thread Göran Broström
eric(0) >> m2 <- aftreg(Surv(enter, exit, event) ~ ses, dist='lognormal', data = mort) >> head(predict(m2, type='expected')) ## is this correct? > numeric(0) > > > from eha (the survival and rms packages are not an option for my > 'real' question

Re: [R] AFT model time-dependent with weibull distribution

2011-08-19 Thread Göran Broström
__ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Göran Bros

Re: [R] AFT model time-dependent with weibull distribution

2011-08-20 Thread Göran Broström
p@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Göran Broström __

Re: [R] AFT model time-dependent with weibull distribution

2011-08-21 Thread Göran Broström
On Sat, Aug 20, 2011 at 7:33 PM, JPF wrote: > > Göran Broström wrote: >> >> >> Good. Do you still need answers to your other questions? >> >> > > Yes. Could answer the following two questions: > > 1- Can I use phreg function to estimate  a mode

Re: [R] pooled hazard model with aftreg and time-dependent variables

2011-08-26 Thread Göran Broström
gt; https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Göran Broström __ R-help@r-project.org m

[R] get and save

2011-09-09 Thread Göran Broström
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.

Re: [R] get and save

2011-09-09 Thread Göran Broström
On Fri, Sep 9, 2011 at 12:09 PM, Duncan Murdoch wrote: > On 11-09-09 6:01 AM, Ivan Calandra wrote: > >> Hi! >> >> Why don't you just save tmp? >> save(tmp, file = paste(name, "rda", sep = ".")) >> >> I don't think it makes much difference, at least not with your example. >> Or does it? >> > > That

Re: [R] coxreg vs coxph: time-dependent treatment

2011-09-12 Thread Göran Broström
Dear Ehsan, the cluster option is not implemented in 'eha', although you obviously get no error if trying I'll fix this. Thanks for the report. (So, use 'coxph' with cluster). Göran On Mon, Sep 12, 2011 at 4:43 AM, Ehsan Karim wrote: > Sorry: there was an error in the weight calculation,

Re: [R] error using glmmML()

2011-06-22 Thread Göran Broström
/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Göran Broström __ R-help@r-project.org mailing list https:/

Re: [R] comparing SAS and R survival analysis with time-dependent covariates

2011-07-20 Thread Göran Broström
st archive at Nabble.com. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Göran Broström __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] comparing SAS and R survival analysis with time-dependent covariates

2011-07-22 Thread Göran Broström
; > > Which criteria would you use to determinate if Efron approximation is good > or not with grouped event data ? Is it possible to compare appproximation > models by the results and not by the model assumption ? > > Thank you very much. > -- Göran Broström ___

Re: [R] Cox model approximaions (was "comparing SAS and R survival....)

2011-07-24 Thread Göran Broström
ion of > the > process) are due to the fact that continuous event times are grouped > into > intervals. > > So I think the logistic approximation may not be the best for my problem > despite the estimate on my real data set (shown on my previous post) do > give > int

Re: [R] differences between survival models between STATA and R

2012-08-31 Thread Göran Broström
On Mon, Jul 9, 2012 at 3:59 PM, Terry Therneau wrote: > Without more information, we can only guess what you did, or what you are > seeing on the page that is "different". > > I'll make a random guess though. There are about 5 ways to paramaterize > the Weibull distribution. The standard packag

Re: [R] AFTREG weights

2012-09-04 Thread Göran Broström
On Wed, Aug 1, 2012 at 3:08 PM, wrote: > Dear Göran Broström, > I am trying to use AFTREG function for R to estimate a loglogistic > survival function, including time dependent covariates. > Actually, my Subset includes some partial events; the idea is to model > this kind of events using some

Re: [R] "Non-finite finite-difference value" error in eha's aftreg

2011-11-30 Thread Göran Broström
On Wed, Nov 16, 2011 at 3:06 PM, Milan Bouchet-Valat wrote: > Hi list! > > > I'm getting an error message when trying to fit an accelerated failure > time parametric model using the aftreg() function from package eha: > > Error in optim(beta, Fmin, method = "BFGS", control = list(trace = > > as.

Re: [R] binomial logistic regression question

2011-09-27 Thread Göran Broström
On Tue, Sep 27, 2011 at 2:59 PM, Patrick Breheny wrote: > On 09/27/2011 07:53 AM, majesty wrote: > >> Dear subscribers, >> >> I am looking for a function which would allow me to model the dependent >> variable as the number of successes in a series of Bernoulli trials. My >> data >> looks like thi

Re: [R] coxreg vs coxph: time-dependent treatment

2011-09-30 Thread Göran Broström
2011/9/12 Göran Broström > Dear Ehsan, > > the cluster option is not implemented in 'eha', although you obviously get > no error if trying > I'll fix this. Thanks for the report. (So, use 'coxph' with cluster). > > Actually, there is nothing to fix; the cluster function works like the ident

Re: [R] Fitting weibull, exponential and lognormal distributions to left-truncated data.

2008-10-08 Thread Göran Broström
s, http://www.stats.ox.ac.uk/~ripley/ >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UK Fax: +44 1865 272595 >> >> This message has been checked for vi

[R] boxplot and stripchart

2008-10-10 Thread Göran Broström
ood. So my question is: Is it possible to combine boxplots and and stripcharts in one figure? (Of course, in R anything is possible, but I mean in a simple way.) Or is there some other good alternative for a case like this? -- Göran Broström __ R-help@r-p

Re: [R] boxplot and stripchart

2008-10-10 Thread Göran Broström
On Fri, Oct 10, 2008 at 4:24 PM, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Göran Broström wrote: >> I want to make illustrations a la boxplot for a data material with >> several groups. Some of the groups are very small, so a boxplot >> doesn't make sense. I

[R] R on 64-bit Windows

2008-10-15 Thread Göran Broström
, will there be a 64-bit version availble soon? When I websearch for 64-bit MinGW it seems to exist out there. -- Göran Broström __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Weibull parameter estimation

2008-10-22 Thread Göran Broström
ith an exponential model, i.e., give the starting values shape = 1 and scale = mean(X), if X is your data. This is the default behaviour of the functions phreg and aftreg in the package 'eha'. So if you don't like to have to supply starting values, use one of them. -- Göran Broström _

Re: [R] Fitting of lognormal distribution to lower tail experimental data

2009-01-16 Thread Göran Broström
est regards, > Mattias > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self

Re: [R] Fitting of lognormal distribution to lower tail experimental data

2009-01-16 Thread Göran Broström
On Sat, Jan 17, 2009 at 12:27 AM, Göran Broström wrote: > On Fri, Jan 16, 2009 at 3:31 PM, Mattias Brännström > wrote: >> Thank you, David! >> >> I agree and apprechiate your analysis, which definitely will influence my >> analysis of this data, but still I would

Re: [R] left truncated data survival analysis package

2009-02-26 Thread Göran Broström
p@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Göran Broström __

Re: [R] Fitting weibull and exponential distributions to left censoring data

2008-11-01 Thread Göran Broström
p page, which will migrate > to > the general R distribution in due course. > > Terry Therneau > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide ht

Re: [R] How R calculate p-value ?

2008-11-01 Thread Göran Broström
mailing list archive at Nabble.com. > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-cont

Re: [R] Loglogistic distribution

2008-11-01 Thread Göran Broström
info/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Göran Broström __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

Re: [R] Fitting weibull and exponential distributions to left censoring data

2008-11-02 Thread Göran Broström
m, p= 1 Number of Newton-Raphson Iterations: 1 n = 1000 That's fine , but > cenreg(y, !d, rep(1, length(y)), dist = "weibull") Error in checkSlotAssignment(object, name, value) : "y" is not a slot in class "survreg" Göran > Christian > > >

Re: [R] Fitting weibull and exponential distributions to left censoring data

2008-11-02 Thread Göran Broström
ed data, however. > > (As the author of the survival routines, I have a fairly good idea of what > they can do.) > > Terry Therneau > -- Göran Broström __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

<    1   2