Displaying 3 results from an estimated 3 matches for "model_2".
Did you mean:
model2
2012 Sep 04
5
Associations and Math between Models
I''ve setup two models, 1 and 2, that are associated by
has_and_belongs_to_many. I''m trying to get an attribute from model_1 to use
in a method in model_2. When I use the code below, I get an error saying
''undefined method model_1_id''. What am I missing? Thanks!
Model_2.rb
Class Model_2 < ActiveRecord::Base
...
has_and_belongs_to_many :model_1
def some_method
attr_a * Model_1.find(model_1_id).attr_I_need
end
--
You rece...
2005 Aug 16
1
predict nbinomial glm
...data_frame <- data.frame(a,b,c,d)
model_1 = glm.nb(a ~ b + d , data = data_frame)
pred_model_1 = predict(model_1, newdata = data_frame, type = "response", se.fit
= FALSE, dispersion = NULL, terms = NULL)
subset_of_dataframe = subset(data_frame, (b > 80 & c < 190 ))
model_2 = glm.nb(a ~ b + d , data = subset_of_dataframe)
pred_model_2 = predict(model_2, newdata = subset_of_dataframe, type =
"response", se.fit = FALSE, dispersion = NULL, terms = NULL)
2009 Jun 26
1
Alternate error structures in lme4?
Hi R users,
The nlme library enabled several alternate error structures useful for
longitudinal or repeated-measures data. For example, a continuous AR(1)
process:
model_2 = update(model_1, correlation = corCAR1(form = ~ time | subject))
Does anybody know if this is available in lme4?
Thank you
Ben
--
View this message in context: http://www.nabble.com/Alternate-error-structures-in-lme4--tp24226643p24226643.html
Sent from the R help mailing list archive at Nabble....