Displaying 20 results from an estimated 2000 matches similar to: "Extract estimate of error variance from glm() object"
2024 Dec 24
1
Extract estimate of error variance from glm() object
I think vcov() gives estimates of VCV for coefficients.
I want estimate of SD for residuals
On Tue, Dec 24, 2024 at 7:24?PM Ben Bolker <bbolker at gmail.com> wrote:
>
> vcov(). ?
>
>
> On Tue, Dec 24, 2024, 8:45 AM Christofer Bogaso <bogaso.christofer at gmail.com> wrote:
>>
>> Hi,
>>
>> I have below GLM fit
>>
>> clotting <-
2024 Dec 24
1
Extract estimate of error variance from glm() object
?deviance ?anova
Bert
On Tue, Dec 24, 2024 at 6:22?AM Christofer Bogaso
<bogaso.christofer at gmail.com> wrote:
>
> I think vcov() gives estimates of VCV for coefficients.
>
> I want estimate of SD for residuals
>
> On Tue, Dec 24, 2024 at 7:24?PM Ben Bolker <bbolker at gmail.com> wrote:
> >
> > vcov(). ?
> >
> >
> > On Tue, Dec 24,
2024 Dec 24
1
Extract estimate of error variance from glm() object
vcov(). ?
On Tue, Dec 24, 2024, 8:45 AM Christofer Bogaso <bogaso.christofer at gmail.com>
wrote:
> Hi,
>
> I have below GLM fit
>
> 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))
> summary(glm(lot1 ~ log(u), data = clotting, family = gaussian))
>
>
2010 Sep 02
1
Help on glm and optim
Dear all,
I'm trying to use the "optim" function to replicate the results from the "glm" using an example from the help page of "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 =
2010 Feb 15
1
Extract values from a predict() result... how?
Hello,
silly question I suppose, but somehow I can't manage to extract the
probabilities from a glm.predict() result:
> str(res)
Named num [1:9] 0.00814 0.01877 0.025 0.02941 0.03563 ...
- attr(*, "names")= chr [1:9] "1" "2" "3" "4" ...
I got from:
# A Gamma example, from McCullagh & Nelder (1989, pp. 300-2)
clotting <-
2012 Aug 10
1
plotting profile likelihood curves
Hello,
I am trying to figure out how to plot the profile likelihood curve of a GLM
parameter with 95% pCI's on the same plot. The example I have been trying
with is below. The plots I am getting are not the likelihood curves that I
was expecting. The y-axis of the plots is tau and I would like that axis
to be the likelihood so that I have a curve that maxes at the parameter
estimate. I am
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
2007 Aug 19
1
can't find "as.family" function
Hi R users,
I want to use dglm Package.
I run the examples and it give me an error:
Error en dglm(lot1 ~ log(u), ~1, data = clotting, family = Gamma) :
no se pudo encontrar la funci?n "as.family"
dglm can't find "as.family" function
why ?
Thank you for your help
2009 Feb 24
2
Syntax in taking log to transfrom the data to fit Gaussian distribution
Hi,
I have a data set (weight) that does not follow the Gaussian (Normal)
distribution. However, I have to transform the data before applying the
Gaussian distribution. I used this syntax and used log(weight) as:
posJy.model<-glm(log(weight) ~ factor(pos),
family=gaussian(link='identity'), subset=Soil=="Jy"). This syntax COULD NOT
transform the data. But if I transform the
2018 Mar 04
3
Change Function based on ifelse() condtion
Below is my full implementation (tried to make it simple as for demonstration)
Lapply_me = function(X = X, FUN = FUN, Apply_MC = FALSE, ...) {
if (Apply_MC) {
return(mclapply(X, FUN, ...))
} else {
if (any(names(list(...)) == 'mc.cores')) {
myList = list(...)[!names(list(...)) %in% 'mc.cores']
}
return(lapply(X, FUN, myList))
}
}
Lapply_me(as.list(1:4), function(xx) {
if (xx ==
2010 Jul 10
7
Need help on date calculation
Hi all, please see my code:
> library(zoo)
> a <- as.yearmon("March-2010", "%B-%Y")
> b <- as.yearmon("May-2010", "%B-%Y")
>
> nn <- (b-a)*12 # number of months in between them
> nn
[1] 2
> as.integer(nn)
[1] 1
What is the correct way to find the number of months between "a" and "b",
still
2018 Mar 04
0
Change Function based on ifelse() condtion
The reason that it works for Apply_MC=TRUE is that in that case you call
mclapply(X,FUN,...) and
the mclapply() function strips off the mc.cores argument from the "..."
list before calling FUN, so FUN is being called with zero arguments,
exactly as it is declared.
A quick workaround is to change the line
Lapply_me(as.list(1:4), function(xx) {
to
Lapply_me(as.list(1:4),
2018 Mar 04
2
Change Function based on ifelse() condtion
My modified function looks below :
Lapply_me = function(X = X, FUN = FUN, Apply_MC = FALSE, ...) {
if (Apply_MC) {
return(mclapply(X, FUN, ...))
} else {
if (any(names(list(...)) == 'mc.cores')) {
myList = list(...)[!names(list(...)) %in% 'mc.cores']
}
return(lapply(X, FUN, myList))
}
}
Here, I am not passing ... anymore rather passing myList
On Sun, Mar 4, 2018 at 10:37 PM,
2018 Mar 04
2
Change Function based on ifelse() condtion
@Eric - with this approach I am getting below error :
Error in FUN(X[[i]], ...) : unused argument (list())
On Sun, Mar 4, 2018 at 10:18 PM, Eric Berger <ericjberger at gmail.com> wrote:
> Hi Christofer,
> You cannot assign to list(...). You can do the following
>
> myList <- list(...)[!names(list(...)) %in% 'mc.cores']
>
> HTH,
> Eric
>
> On Sun, Mar
2012 Dec 14
5
A question on list and lapply
Dear all, let say I have following list:
Dat <- vector("list", length = 26)
names(Dat) <- LETTERS
My_Function <- function(x) return(rnorm(5))
Dat1 <- lapply(Dat, My_Function)
However I want to apply my function 'My_Function' for all elements of
'Dat' except the elements having 'names(Dat) == "P"'. Here I have
specified the name
2017 Aug 02
4
Extracting numeric part from a string
Hi again,
I am struggling to extract the number part from below string :
"\"cm_ffm\":\"563.77\""
Basically, I need to extract 563.77 from above. The underlying number
can be a whole number, and there could be comma separator as well.
So far I tried below :
> library(stringr)
> str_extract("\"cm_ffm\":\"563.77\"",
2012 Mar 16
4
How to start R in maximized size???
Dear all, when I start R, I want that the console window should be in
the Maximized size automatically. Can somebody help me how to achieve
that?
Thanks and regards,
2013 Mar 28
4
How to replace '$' sign?
Hello again,
I want to remove "$" sign and replace with nothing in my text.
Therefore I used following code:
> gsub("$|,", "", "$232,685.35436")
[1] "$232685.35436"
However I could not remove '$' sign.
Can somebody help me why is it so?
Thanks and regards
2011 Nov 10
5
A question on Programming
Dear all. Let say I have a group of codes which will be used in many places
in my overall R-code files. These group of codes will be used within a
for-loop (with a big length, like 10000 times) and also many other places
outside of that for loop. As this group of codes are being used in many
places, I thought to put them within a user-defined function.
Here my question is, is there any speed
2017 Aug 10
3
Zoo rolling window with increasing window size
Hi Joshua, thanks for your prompt reply. However as I said, sum()
function I used here just for demonstrating the problem, I have other
custom function to implement, not necessarily sum()
I am looking for a generic solution for above problem.
Any better idea? Thanks,
On Fri, Aug 11, 2017 at 12:04 AM, Joshua Ulrich <josh.m.ulrich at gmail.com> wrote:
> Use a `width` of integer index