Thanks Tomas,
I confirm the R Under development (unstable) (2018-04-26 r74651) version works
for Rscript when the file name has a space, and no arguments are specified.
C:\>"C:\Program Files\R\R-devel\bin\x64\Rscript.exe" "C:\foo bar.R"
R Under development (unstable) (2018-04-26 r74651)
Platfo
Hi all,
Very surprising (to me!) and mystifying result from predict.glm(): the
predictions vary depending on whether or not I use ns() or
splines::ns(). Reprex follows:
library(splines)
set.seed(12345)
dat <- data.frame(claim = rbinom(1000, 1, 0.5))
mns <- c(3.4, 3.6)
sds <- c(0.24, 0.35)
dat$wi
Can’t copy from my computer as gmail is blocked at work but if it helps,
the “predvars” attribute if the terms object is not the same.
Avi
On Fri, Apr 27, 2018 at 9:25 AM Hadley Wickham wrote:
> Hi all,
>
> Very surprising (to me!) and mystifying result from predict.glm(): the
> predictions var
Hi Hadley,
This is related to how the terms are constructed. If you look at terms(m1)
versus terms(m2), you see that in the case of m1 the knots are added to the
attribute predvars. Contrary, when using splines::ns() this doesn't happen.
Compare:
mf <- model.frame(claim ~ ns(wind, df = 5), data =
On 27/04/2018 9:25 AM, Hadley Wickham wrote:
Hi all,
Very surprising (to me!) and mystifying result from predict.glm(): the
predictions vary depending on whether or not I use ns() or
splines::ns(). Reprex follows: >
library(splines)
set.seed(12345)
dat <- data.frame(claim = rbinom(1000, 1, 0.5)
On Fri, Apr 27, 2018 at 7:28 AM, Duncan Murdoch
wrote:
> On 27/04/2018 9:25 AM, Hadley Wickham wrote:
>>
>> Hi all,
>>
>> Very surprising (to me!) and mystifying result from predict.glm(): the
>> predictions vary depending on whether or not I use ns() or
>> splines::ns(). Reprex follows: >
>> libr
> Duncan Murdoch
> on Fri, 27 Apr 2018 10:28:16 -0400 writes:
> On 27/04/2018 9:25 AM, Hadley Wickham wrote:
>> Hi all,
>>
>> Very surprising (to me!) and mystifying result from predict.glm(): the
>> predictions vary depending on whether or not I use ns() or
>