> On Mar 31, 2018, at 8:48 AM, Bendix Carstensen
> wrote:
>
> all.vars works fine, EXCEPT, it give a bit too much.
> I only want the regression variables, but in the following example I also get
> "k" the variable holding the chosen knots. Any machinery to find
all.vars works fine, EXCEPT, it give a bit too much.
I only want the regression variables, but in the following example I also get
"k" the variable holding the chosen knots. Any machinery to find only "real"
regression variables?
cheers, Bendix
library( splines )
y <- rnorm(100)
x <- rnorm(100)
Hi Bendix,
If the 'model' argument to glm() is TRUE (the default), you can get the
structure of the model frame that was used to fit the model, by using:
> str(mx$data)
'data.frame': 200 obs. of 4 variables:
$ D: int 0 1 0 1 1 0 1 1 1 1 ...
$ x: num 0.705 2.15 0.572 1.249 0.807 ...
$ f:
Hi,
Some try:
> names(mi$xlevels)
[1] "f"
> all.vars(mi$formula)
[1] "D" "x" "f" "Y"
> names(mx$xlevels)
[1] "f"
> all.vars(mx$formula)
[1] "D" "x" "f"
When offset is indicated out of the formula, it does not work...
Marc
Le 07/03/2018 à 06:20, Bendix Carstensen a écrit :
I would like to
4 matches
Mail list logo