Displaying 4 results from an estimated 4 matches for "model_a".
Did you mean:
model_1
2011 Sep 08
2
Extract r.squared using cbind in lm
...acted with summary(model)$r.squared,
but that is not working in in the case with cbind.
Here an example to illustrate the problem:
a <- c(1,3,5,2,5,3,1,6,7,2,3,2,6)
b <- c(12,15,18,10,18,22,9,7,9,23,12,17,13)
c <- c(22,26,32,33,32,28,29,37,34,29,30,32,29)
data <- data.frame(a,b,c)
model_a <-lm(b~a,data=data)
model_b <-lm(cbind(b,c)~a,data=data)
summary(model_a)$r.squared
summary(model_b)$r.squared
How can I access r.squared in my case? Is there any option?
In the end, I want a dataframe containing the the intercept,
slope, p-value and r.squared for all Y's of my regress...
2012 Sep 08
1
Using predict() After Adding a Factor to a glm.nb() Model
...1990))
count<-c(60,35,36,12,8,112,98,20,13,15,15,65,43,49,51,34,33,33,33,40,11,0)
data<-data.frame(site, year, count)
# > site year count
# 1 a 1980 60
# 2 a 1981 35
# 3 a 1982 36
# 4 a 1993 12
# .
# .
# .
# I ran a negative binomial glm using:
library(MASS)
model_a<-glm.nb(count~year, data=data)
# then extracted predicted values using:
py<-data.frame(seq(from=min(data$year), to=max(data$year), by=1))
p1<-predict(model_a, newdata=py, se.fit=TRUE, type='response')
f1<-p1$fit
plot(count~year, data=data)
lines(py$year, f1)
# Works perfectl...
2007 Dec 13
4
please explain find_with_ferret, retrieve_records, :include and :conditions
Hello, I''m using find_with_ferret to search multiple models and it
works great. The trouble is I need to filter the results
using :include and :conditions.
I get two errors depending on the syntax I use in the search. Reading
the source, I see the retrieve_records method seems to filter
the :include and :conditions so that they only apply to the relevant
model when searching
2011 Oct 20
2
Access other model attributes directly with has_one, belongs_to ?
So, I have 2 models A and B that share 5 common attributes and all other
attributes are different. So I wanted to extract these 5 out into one
common table and use has_one, belongs_to to knit it back together. So
now there are 3 tables with 1 having the shared properties, we''ll call
this table C.
Table A
id
dollar_amount
Table B
id
quantity_on_hand
Table C
id
version
My question is,