Displaying 4 results from an estimated 4 matches for "lot2".
Did you mean:
lot
2011 Nov 24
1
what is wrong with this dataset?
> d = data.frame(gender=rep(c('f','m'), 5), pos=rep(c('worker', 'manager',
'speaker', 'sales', 'investor'), 2), lot1=rnorm(10), lot2=rnorm(10))
> d
gender pos lot1 lot2
1 f worker 1.1035316 0.8710510
2 m manager -0.4824027 -0.2595865
3 f speaker 0.8933589 -0.5966119
4 m sales 0.4489920 0.4971199
5 f investor 0.9246900 -0.7531117
6 m worker 0.2777642 -0.33...
2012 Aug 10
1
plotting profile likelihood curves
...axes at the parameter
estimate. I am not sure where I find those likelihood values? I may just
be misinterpreting the theory behind this. Thanks for any help you can give.
Max
clotting <- data.frame(
+ u = c(5,10,15,20,30,40,60,80,100),
+ lot1 = c(118,58,42,35,27,25,21,19,18),
+ lot2 = c(69,35,26,21,18,16,13,12,12))
glm(lot2 ~ log(u), data=clotting, family=Gamma)
prof<-profile(glm2)
plot(prof)
[[alternative HTML version deleted]]
2010 Feb 15
1
Extract values from a predict() result... how?
...63 ...
- attr(*, "names")= chr [1:9] "1" "2" "3" "4" ...
I got from:
# A Gamma example, from McCullagh & Nelder (1989, pp. 300-2)
clotting <- data.frame(
u = c(5,10,15,20,30,40,60,80,100),
lot1 = c(118,58,42,35,27,25,21,19,18),
lot2 = c(69,35,26,21,18,16,13,12,12))
model <- glm(lot1 ~ log(u), data=clotting, family=Gamma)
res <- predict(model, clotting)
I want to transfer the probabilities "0.00814 0.01877 0.025 0.02941
0.03563 ..." to a separate vector, how do I do this?
2010 Sep 02
1
Help on glm and optim
...quot;glm", but I could not get the "optim" function to work. Would you please point out where I did wrong? Thanks a lot.
The following is the code:
# Step 1: fit the glm
clotting <- data.frame(
u = c(5,10,15,20,30,40,60,80,100),
lot1 = c(118,58,42,35,27,25,21,19,18),
lot2 = c(69,35,26,21,18,16,13,12,12))
fit1 <- glm(lot1 ~ log(u), data=clotting, family=Gamma)
# Step 2: use optim
# define loglikelihood function to be maximized over
# theta is a vector of three parameters: intercept, cofficient for log(u) and dispersion parameter
loglik <- function(theta,data){...