Re: [R] Options for zooming plots other than zm()

2020-04-26 Thread Robert Dodier
Many thanks to everyone who contributed to this discussion. It looks like plotly and dygraphs both work well for zooming plots with thousands of points (and many other things). Thanks again, I appreciate your help. best, Robert Dodier On Fri, Apr 24, 2020 at 11:11 AM Robert Dodier wrote: > > H

Re: [R] Problem with MASS::fitdistr().

2020-04-26 Thread Mark Leeds
it's been a long time but I vaguely remember Rvmminb computing gradients ( and possibly hessians ) subject to constraints. John can say more about this but, if one is going to go through the anguish of creating a fitdstr2, then you may want to have it call Rvmminb instead of whatever is cur

Re: [R] Problem with MASS::fitdistr().

2020-04-26 Thread Abby Spurdle
I thought about this some more and realized my last suggestion is unlikely to work. Another possibility would be to create a new function to compute the Hessian with a smaller step size, but I suspect there will be more problems. Possibly a much simpler approach would be to: Modify the source for

Re: [R] [FORGED] Re: Problem with MASS::fitdistr().

2020-04-26 Thread Rolf Turner
On 27/04/20 3:01 am, J C Nash wrote: : Peter is correct. I was about to reply when I saw his post. It should be possible to suppress the Hessian call. I try to do this generally in my optimx package as computing the Hessian by finite differences uses a lot more compute-time than solving the op

[R] Fwd: How to edit a dataframe/tibble in R console

2020-04-26 Thread Yousri Fanous
Jim solution posted Yousri -- Forwarded message - From: Jim Lemon Date: Sun, Apr 26, 2020 at 6:30 AM Subject: Re: [R] How to edit a dataframe/tibble in R console To: Yousri Fanous Hi Yousri, This may help: rootstock.df<-as.data.frame(lapply(rootstock,as.vector)) edit(rootstoc

Re: [R] Problem with MASS::fitdistr().

2020-04-26 Thread Abby Spurdle
> Dear Ms. Spurdle I usually refer to myself as "He". (But then, that's not the whole story...) I'm not an expert on maximum likelihood approaches. So, I apologize if the following suggestion is a poor one. Does your likelihood function have a limit, as alpha approaches zero (say zero)? If so, t

[R] (probably) SOLVED was .... Re: confidence interval

2020-04-26 Thread David Winsemius
On 4/26/20 12:00 PM, David Winsemius wrote: On 4/26/20 11:26 AM, Alex Serafim wrote: there is a function called "confbands", which is no longer available in software R. It is not "confband" or "confBands", but "confbands", I need to use this object to add confidence intervals in my work. Wh

Re: [R] confidence interval

2020-04-26 Thread David Winsemius
On 4/26/20 11:26 AM, Alex Serafim wrote: there is a function called "confbands", which is no longer available in software R. It is not "confband" or "confBands", but "confbands", I need to use this object to add confidence intervals in my work. Why is this function not available? attached is an

[R] confidence interval

2020-04-26 Thread Alex Serafim
there is a function called "confbands", which is no longer available in software R. It is not "confband" or "confBands", but "confbands", I need to use this object to add confidence intervals in my work. Why is this function not available? attached is an image that shows how the graph should look,

Re: [R] Automating package updates after major version change

2020-04-26 Thread Rich Shepard
On Sun, 26 Apr 2020, Patrick (Malone Quantitative) wrote: A package on github called yamlpack appears to do a lot of the work involved. I can't vouch for it personally. https://github.com/combiz/yamlpack Thanks, Patrick. I'll take a close look at this, too. Stay well, Rich _

Re: [R] Automating package updates after major version change

2020-04-26 Thread Rich Shepard
On Sun, 26 Apr 2020, Sarah Goslee wrote: Not so coincidentally, I just worked thru this for myself. Thanks, Sarah. Stay well, Rich __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] Automating package updates after major version change

2020-04-26 Thread Patrick (Malone Quantitative)
A package on github called yamlpack appears to do a lot of the work involved. I can't vouch for it personally. https://github.com/combiz/yamlpack On Sun, Apr 26, 2020 at 1:12 PM Sarah Goslee wrote: > Not so coincidentally, I just worked thru this for myself. > > I did want to rebuild and reinst

Re: [R] Automating package updates after major version change

2020-04-26 Thread Sarah Goslee
Not so coincidentally, I just worked thru this for myself. I did want to rebuild and reinstall everything, but as automatically as possible, although in a way that let me see what happened and what went wrong. http://numberwright.com/2020/04/clean-and-new/ There are several things to consider: C

[R] Package 'coin' - How to extract rho

2020-04-26 Thread Blume Christine
I am using the 'coin' package to compute bootstrapped correlations. I am able to extract the p-value with confidence intervals as well as the test statistic Z. However, I am unable to find rho, i.e. the correlation coefficient. Can someone help? Kind regards, Christine [[alternative H

Re: [R] Automating package updates after major version change

2020-04-26 Thread Rich Shepard
On Sun, 26 Apr 2020, Bert Gunter wrote: ?install.packages (argument dependencies) which is explicitly pointed to by ?update.packages "Warning Take care when using dependencies (passed to install.packages) with update.packages, for it is unclear where new dependencies should be installed. The

Re: [R] Automating package updates after major version change

2020-04-26 Thread Bert Gunter
?install.packages (argument dependencies) which is explicitly pointed to by ?update.packages "Warning Take care when using dependencies (passed to install.packages) with update.packages, for it is unclear where new dependencies should be installed. The current implementation will only allow it

Re: [R] Survival analysis

2020-04-26 Thread Medic
cpolwart wrote: > the event can only happen once > 1. Yes, I'm not interested in repeat events. 2. I just had an interest in learning the code for survival analysis in case there are: event, left censored (not left truncating) and right censored, nothing more! But I no longer want to burden anyone

[R] Automating package updates after major version change

2020-04-26 Thread Rich Shepard
After upgrading from -3.6.2 to -4.0.0 I ran 'update.packages()' and spent time rebuilding dependencies, too. Is there a script or method that automates package updates after a major version change in R? My web searches on this topic found tips for only regular package updates without rebuilding m

Re: [R] Problem with MASS::fitdistr().

2020-04-26 Thread J C Nash
Peter is correct. I was about to reply when I saw his post. It should be possible to suppress the Hessian call. I try to do this generally in my optimx package as computing the Hessian by finite differences uses a lot more compute-time than solving the optimization problem that precedes the usual

Re: [R] How to edit a dataframe/tibble in R console

2020-04-26 Thread Yousri Fanous
Thank you Jim. It works like a charm Yousri On Sat, Apr 25, 2020 at 11:25 PM Yousri Fanous wrote: > I recently installed R 3.6.3 on my windows laptop. > > R version 3.6.3 (2020-02-29) > > I am trying to import a stata .dta file to R > > >url<-“http://www.stata-press.com/data/r10/rootstock.dta”

Re: [R] Survival analysis

2020-04-26 Thread cpolwart
On 2020-04-26 10:48, Medic wrote: Very grateful for the all comments! My data contains: • left censored • right censored • events (interval censored does not contain!) (P.S. I understood, that the code with "type = 'left'" is not suitable, because is ONLY for left-censored.) I wanted to get th

Re: [R] Options for zooming plots other than zm()

2020-04-26 Thread Jim Lemon
Hi Robert, Maybe you can use something simple like this: zoomInScatterPlot<-function(x=NULL,y,...) { if(is.null(x)) x<-1:length(y) plot(x,y,...) xylim<-par("usr") boxed.labels(xylim[1]-diff(xylim[1:2])/20, xylim[3]-diff(xylim[3:4])/10,"Done") xy1<-locator(1) done<-FALSE while(!done) { i

Re: [R] Survival analysis

2020-04-26 Thread Medic
Very grateful for the all comments! My data contains: • left censored • right censored • events (interval censored does not contain!) (P.S. I understood, that the code with "type = 'left'" is not suitable, because is ONLY for left-censored.) I wanted to get the appropriate code for my so mix dat

Re: [R] Problem with MASS::fitdistr().

2020-04-26 Thread peter dalgaard
The optim() function has trouble calculating derivatives at/near the boundary, because it is using a simplistic finite-difference formula centered on the parameter. optimx::optimr() may work better. -pd > On 26 Apr 2020, at 09:02 , Abby Spurdle wrote: > > I ran your example. > It's possible t

Re: [R] Problem with MASS::fitdistr().

2020-04-26 Thread Rolf Turner
Dear Ms. Spurdle , Thanks for looking into this. I think that you are correct in that it is a problem with the hessian calculation. It seems that fitdistr() explicitly sets hessian=TRUE, with no possibility of opting out. It also seems that optim() ignores the "lower" argument when comput

Re: [R] Problem with MASS::fitdistr().

2020-04-26 Thread Abby Spurdle
fitdistr computes a Hessian matrix. I think optim ignores the lower value computing the Hessian. Here's the result after removing the Hessian and Hessian-dependent info: > str (fit) List of 3 $ estimate: Named num [1:2] 0.000149 1.0797684972 ..- attr(*, "names")= chr [1:2] "alpha" "beta"

[R] How to edit a dataframe/tibble in R console

2020-04-26 Thread Yousri Fanous
I recently installed R 3.6.3 on my windows laptop. R version 3.6.3 (2020-02-29) I am trying to import a stata .dta file to R >url<-“http://www.stata-press.com/data/r10/rootstock.dta” >library(tidyverse) >library(haven) >rootstock<-read_dta(url) All works as expected. >class(rootstock) [1]

Re: [R] Problem with MASS::fitdistr().

2020-04-26 Thread Abby Spurdle
I ran your example. It's possible that it's another bug in the optim function. Here's the optim call (from within fitdistr): stats::optim(x = c(1, 4, 1, 2, 3, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 4, 4, 3, 1, 2, 2, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 1, 1, #more lines... 1, 4, 1, 1, 1, 5, 5, 5, 4, 5, 2,