Displaying 1 result from an estimated 1 matches for "prac3".
Did you mean:
prack
2009 Jan 25
1
[Fwd: Re: evaluation question]
...prepare your code to handle all exotic situations such as
passing weights to prac1 together with a model where one of the variables is
named 'model' or 'wghts' -- this is point 2 in a recent comment by Greg Snow,
which, as he says, stinks hubris.
>
> # SOLUTION # 2
>
> prac3 <- function( model,wghts){
> cur.env <- environment()
> lm( model, weights = wghts, data = cur.env )
> }
>
> prac3(model = y~x, wghts = rep(1, 10))
>
>
this is an equally 'good' 'solution', with the above comments equally
applicable here. you'd h...