Re: [R] question about update()

2023-05-04 Thread Adelchi Azzalini via R-help
Hi, Berwin, good to hear from you, and thanks for the detailed comments and suggestion. Actually, my current experimental code works in the way that you suggest, calling directly lm.fit and glm.fit. What I am trying to develop is an “improved” version of the code for distribution to other

Re: [R] question about update()

2023-05-04 Thread Berwin A Turlach
G'day Adelchi, hope all is well with you. On Thu, 4 May 2023 10:34:00 +0200 Adelchi Azzalini via R-help wrote: > Thanks, Duncan. What you indicate is surely the ideal route. > Unfortunately, in my case this is not feasible, because the > construction of xf and the update call are within an

Re: [R] question about update()

2023-05-04 Thread Duncan Murdoch
On 04/05/2023 4:34 a.m., Adelchi Azzalini wrote: On 4 May 2023, at 10:26, Duncan Murdoch wrote: On 04/05/2023 4:05 a.m., Adelchi Azzalini via R-help wrote: Hi. There must be something about the use of update() which I do not grasp, as the next exercise indicates. Suppose that obj is an

Re: [R] question about update()

2023-05-04 Thread Adelchi Azzalini via R-help
> On 4 May 2023, at 10:26, Duncan Murdoch wrote: > > On 04/05/2023 4:05 a.m., Adelchi Azzalini via R-help wrote: >> Hi. There must be something about the use of update() which I do not grasp, >> as the next exercise indicates. >> Suppose that obj is an object returned by a call to lm() or

[R] question about update()

2023-05-04 Thread Adelchi Azzalini via R-help
Hi. There must be something about the use of update() which I do not grasp, as the next exercise indicates. Suppose that obj is an object returned by a call to lm() or glm(). Next, a new variable xf is constructed using the same dataframe used for producing obj. Then obj$data <- cbind(obj$data,