Displaying 20 results from an estimated 1000 matches similar to: "Help on glm and optim"
2024 Dec 24
1
Extract estimate of error variance from glm() object
... but do note:
glm(lot1 ~ log(u), data = clotting, family = gaussian)
is a plain old *linear model*, which is of course a specific type of
glm, but not one that requires the machinery of glm() to fit. That
is, the above is exactly the same as:
lm(lot1 ~ log(u), data = clotting)
and gives exactly the same sigma() !
(and I would therefore hazard the guess that the poster may
misunderstand
2024 Dec 24
3
Extract estimate of error variance from glm() object
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))
Is there any direct function to extract estimate of Error standard deviation?
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 <-
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))
>
>
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,
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
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
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
2010 Sep 09
5
Help on simple problem with optim
Dear all,
I ran into problems with the function "optim" when I tried to do an mle estimation of a simple lognormal regression. Some warning message poped up saying NANs have been produced in the optimization process. But I could not figure out which part of my code has caused this. I wonder if anybody would help. The code is in the following and the data is in the attachment.
da <-
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
2011 May 16
4
Problem on glmer
Hi all,
I was trying to fit a Gamma hierarchical model using "glmer", but got weird error message that I could not understand. On the other hand, a similar call to the glmmPQL leads to results that are close to what I expect. I also tried to change tha "nAGQ" argument in "glmer", but it did not solve the problem. The model I was fitting has a simple structure - one
2010 Feb 26
1
S4 programming
Dear all,
I'm new to S4 classes and have a question on this. I want to use S4 because I want to define explicitly the slots that the new class can have. But other than that, the new class behaves exactly like a list. But this will not allow me to use the generic functions that are already defined for class "list", such as "$", "c", "[[",
2009 Jun 15
1
Create R object
Dear R users,
I have two simple questions here, and hope someone can help me on this. Thanks in advance.
1.
I have a list object lst=list(a1=matrix(rnorm(4),2,2), a2=matrix(rnorm(4),2,2),a3=matrix(rnorm(4),2,2)). Here I only use three elements for illustration, and in fact the length of lst, n, is unknown in advance. I want to define an object for each element of this lst, and the objects have
2010 Mar 01
1
Method dispatch
Dear all,
In a package, I defined a method for "summary" using setMethod(summary, signature="abc") for my class "abc", but when the package is loaded, the function "summary(x)" where x is of class "abc" seems to have called the default summary function for "ANY" class. Shouldn't it call the method I have defined? How could I get
2010 Mar 01
0
S4 issues
Dear all,
I ran into some issues that I've been trying to figure out for weeks but with no success. So I'm looking for some advice here. I've the following questions:
1. I want to write some S4 classes and methods and add them into a current package that was written in S3. Is this possible? Can both S3 and S4 methods exist in one package?
2. When I sourced my functions using
2008 Mar 23
2
scaling problems in "optim"
Dear R users,
I am trying to figure out the control parameter in "optim," especially,
"fnscale" and "parscale."
In the R docu.,
------------------------------------------------------
fnscale
An overall scaling to be applied to the value of fn and gr during
optimization. If negative, turns the problem into a maximization problem.
Optimization is performed on
2009 Jun 15
0
books on Time serie
A time series text with a title that seems designed to hide its
wide scope is:
Forecasting with Exponential Smoothing
The State Space Approach
Hyndman, R.J., Koehler, A.B., Ord, J.K., Snyder, R.D.
Springer 2009.
This book is actually an excellent overview of time series theory,
ARIMA as well as state space. It is of course, in part, a manual
for the forecast and other packages in what has been
2010 Sep 10
0
[LLVMdev] using GCC LTO files as a frontend to dragonegg?
On 10 September 2010 14:37, Marcus Daniels <mdaniels at lanl.gov> wrote:
> Hello,
>
> With GCC, it is possible to compile GIMPLE from an object file back to
> assembly. With Dragonegg, it seems to be a NOP. (See below for a
> comparison.)
>
> This appears it could be a nice way to mix the strengths of GCC and
> LLVM. If it worked.. Should it?
I can't
2001 Nov 08
3
Problem with optim (method L-BFGS-B)
Hello,
I've just a little problem using the function optim.
Here is the function I want to optimize :
test_function(x){(exp(-0.06751 + 0.25473*((x[1]-350)/150) +
0.04455*((x[2]-40)/20) + 0.09399*((x[3]-400)/100) -
0.17238*((x[4]-250)/50)-
0.45984*((x[5]-550)/150)-0.39508*((x[1]-350)/150)* ((x[1]-350)/150) -
0.05116*((x[2]-40)/20)* ((x[2]-40)/20) -
0.27735*((x[3]-400)/100)*((x[3]-400)/100) -