Re: [R] Error in nlsModel

2018-10-08 Thread William Dunlap via R-help
Weibull<-function(tet1, tet2,x){ 1-exp(-exp(tet1+tet2*log10(x))) } range(effectdata_without_controls$conc) # 0.000135696 0.000247044 range(effectdata_without_controls$effect) # [1] -7.010672 100.240287 nls(effect ~ Weibull(tet1, tet2, conc)) Your Weibull function has a range of

Re: [R] Error in nlsModel

2018-10-08 Thread ProfJCNash
I'm not the author of nlsModel, so would prefer not to tinker with it. But "singular gradient" is a VERY common problem with nls() that is used by nlsModel as I understand it. The issue is actually a singular Jacobian matrix resulting from a rather weak approximation of the derivatives (a simple f

Re: [R] Genuine relative paths with R

2018-10-08 Thread MacQueen, Don via R-help
A few facts (and some opinions): First fact: R understands relative paths (as do the other languages you mentioned) (you have misunderstood R if you think it doesn't) Second fact: R interprets relative paths as being relative to its current working directory Third fact: To find out R'

Re: [R] Error in nlsModel

2018-10-08 Thread PIKAL Petr
Hi I do not want to dig too deep into your code so only 2 comments. 1.Try to plot your defined functions with starting parameters and with defined concentration something like plot(conc, Weibull(1,1, conc)) 2.Try to use conc with different units, something like conc1 <- conc*1000 Cheers Pet

Re: [R] Problems to obtain standardized betas in multiply-imputed data

2018-10-08 Thread PIKAL Petr
Hi as I wrote I am not an expert in multiple imputation and others are probably more capable to give you an answer so please keep your emails coppied to the list. The error message is straightforward and clear - object has to be of class lm My wild guess is that you must not use the whole obje

[R] Error in nlsModel

2018-10-08 Thread Belinda Hum Bei Lin
Hello, It is my first time using R studio and I am facing the error of "Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates" when I try to run my script. From what I read online, I understand that the error might be due to the parameters. However,

Re: [R] Genuine relative paths with R

2018-10-08 Thread Eik Vettorazzi
Dear Olivier, you may find the rprojroot package useful, see https://github.com/r-lib/rprojroot and a discussion https://gist.github.com/jennybc/362f52446fe1ebc4c49f#file-2014-10-12_stop-working-directory-insanity-md Cheers Am 06.10.2018 um 13:48 schrieb Olivier GIVAUDAN: Dear R users, I wou

Re: [R] Plot in real unit (1:1)

2018-10-08 Thread Christian Brandstätter
Dar Jim, late, but it works now perfectly. I made a little function for autoscaling elevation data. https://stackoverflow.com/questions/50606797/plot-in-real-units-mm/52696705#52696705The (paper-)printer typically also autoscales, which needs to be deactivated. Example for a plot with scale i

Re: [R] Strange paradox

2018-10-08 Thread CHATTON Anne via R-help
Dear all, Thank you for your remarks. The data under analysis were multiply-imputed using Mice. To compare the nested models, I used the following R codes by van Buuren: pool.compare (Model2, Model1, method = c("wald"), data = NULL) As far as I know the Wald statistic tests the null hypothesis that