[julia-users] Re: Fitting a weighted multiple linear regression with Julia

2014-11-25 Thread Ryan Kyle
Just to follow-up: I realized that one may supply linreg a weights 
argument, and that the data I had passed the function were not in the 
correct format. The weighted multiple linear regression is working now.

Ryan

On Saturday, November 22, 2014 10:46:58 AM UTC-5, Ryan Kyle wrote:
>
> Greetings,
>
> I just started using Julia yesterday, and I'm currently trying to 
> translate a bit of my existing R code. I hope the answer isn't too obvious, 
> but I'm not sure how to fit a weighted linear regression in Julia -- in R, 
> I would try something like
>
> weighted_lm <- lm(Y ~ X1 + X2, weights = my_weights, data = my_data)
>
> Is this currently possible using linreg or GLM? The following thread 
> suggests this feature may be still be unavailable:
>
> https://github.com/JuliaStats/GLM.jl/issues/37
>
> Cheers,
> Ryan
>


[julia-users] Re: Fitting a weighted multiple linear regression with Julia

2014-11-22 Thread Steven G. Johnson
You can always use JuMP or one of the other generic optimization packages 
to do multi-dimensional fitting; although it may be suboptimal efficiency 
due to not taking advantage of the special structure of the problem, the 
problem is convex and any local optimizer should converge to the solution 
you want.