-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Weights #94
Comments
Can you please provide more detail about the models you are talking about? Currently, your question bit vague. |
For any model. df = DataFrame(X = 1:10, Y = 20:29, weights = 1:10) In GLM.jl, I can do: glm(@formula(Y ~ X), df, Normal(), IdentityLink(), wts=df.weights) However, in CRRao, there is no option for With bootstrap, what I want to do is: using Distributions
replicates = 1000
dist_coef = [coef(glm(@formula(Y ~ X), df, Normal(), IdentityLink(), wts=df.weights .* rand(Multinomial(10, 10))))[1] for i in 1:replicates]
SE = std(dist_coef) |
Yes, this feature can be added. GLM can be added quickly. Not sure how to handle the Bayesian model at this stage. |
@ShouvikGhosh2048 can you allow fit to accept keyword arguments and then pass them to glm? |
@ayushpatnaikgit Like this: function fit(formula::FormulaTerm, data::DataFrame, modelClass::LinearRegression; kwargs...)
model = lm(formula, data; kwargs...)
return FrequentistRegression(:LinearRegression, model, formula)
end Or just weights? |
I think all kwargs like you have shown. |
How can we incorporate weights in the models? I want to do bootstrap to calculate the standard errors. The weights will be drawn from the multinomial distribution.
The text was updated successfully, but these errors were encountered: