Displaying 20 results from an estimated 20000 matches similar to: "What is 'freeny.x' object?"
2011 Oct 09
3
Finding solution
Dear all, I have a system of simultaneous equations with 2 unknowns as
follows:
x*y + (1-x) = 0.05
x*(y - .5)^2 + (1-x)*0.6 = 0.56^2
Ofcourse I can do it manually however wondering whether there is any direct
way in R available to get the solution of this system?
Thanks and regards,
[[alternative HTML version deleted]]
2017 Aug 23
2
Getting all possible combinations
> On 23 Aug 2017, at 20:51 , Ista Zahn <istazahn at gmail.com> wrote:
>
> On Wed, Aug 23, 2017 at 12:35 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
>> ummm, Ista, it's 2^n.
>
> ummm yes ughhhh.
>
You didn't really say otherwise: sum(choose(n,0:n)) == 2^n by the binomial expansion of (1+1)^n (but you knew that)
This points to a different
2017 Aug 23
3
Getting all possible combinations
ummm, Ista, it's 2^n.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Wed, Aug 23, 2017 at 8:52 AM, Ista Zahn <istazahn at gmail.com> wrote:
> On Wed, Aug 23, 2017 at 11:33 AM, Christofer Bogaso
>
2017 Aug 23
0
Getting all possible combinations
On Wed, Aug 23, 2017 at 12:35 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
> ummm, Ista, it's 2^n.
ummm yes ughhhh.
My point is, if the number of groups is large, check it before hand.
If you can check it without embarrassing yourself in public like I did
that's even better.
Best,
Ista
>
> Cheers,
> Bert
>
>
> Bert Gunter
>
> "The trouble
2012 Jul 30
4
A "matching problem"
Dear all, I was encountering with a typical Matching problem and was
wondering whether R can help me to solve it directly.
Let say, I have 2 vectors of equal length:
vector1 <- LETTERS[1:6]
vector2 <- letters[1:6]
Now I need to match these 2 vectors with all possible ways like:
(A,B,C,D,E) & (a,b,c,d,e) is 1 match. Another match can be (A,B,C,D,E) &
(b,a,c,d,e), however there
2018 Mar 05
1
model.frame strips class as promised, but fails to strip OBJECT in C
Full thread here:
https://github.com/tidyverse/broom/issues/287
Reproducible example:
is.object(freeny$y)
# [1] TRUE
attr(freeny$y, 'class')
# [1] "ts"
class(freeny$y)
# [1] "ts"
# ts attribute wiped by model.frame
class(model.frame(y ~ ., data = freeny)$y)
# [1] "numeric"
attr(model.frame(y ~ ., data = freeny)$y, 'class')
# NULL
# but still:
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?
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
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 <-
2011 Apr 27
3
Question on list object
Dear all, let say, I have following list object:
listObj <- vector("list", length = 3)
listObj[[1]] <- rnorm(3)
listObj[[2]] <- rnorm(4)
listObj[[3]] <- rnorm(5)
Now I want to convert above list into a Matrix. Ofcourse I can do it using
"Reduce("rbind", listObj)". However as you notice that as elements of that
list are arbitrary length vectors,
2009 Nov 28
1
Include manually an intercept in lm without breaking it?
Hi
Say I want to add manually an intercept in the function lm. Even if
almost all results will be identical, few stats are different as DF
counting will be different as intercept will not be included in
"automatic" case, while it will be in "manual" case. See:
###usual lm on freeny
fr<-lm(freeny.y~freeny.x)
###manual lm on freeny
man<-cbind(1,freeny.x)
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 ==
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 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,
2009 Nov 29
1
lm: eval(parse(text=)) works on one side y/x but not on both?
Hi
My goal is to do a (multiple) regression, just knowing that my Y
variables will be the say k first variables of a matrix/data frame. I
thought I should do it with eval(parse)) but encounter a strange problem.
See:
lm(y~.-y, data=freeny) #that's what I want to do in the one equation case
#Problem is I don't know name of the variable... only that it is the
first one...
#so idea is to
2008 Mar 03
1
How to include an externally defined NULL value in lm
Hello!
I would love to be able to include an external variable to a lm call, I
mean something:
if(TRUE)
a<-freeny.x[,4]
else
a<-NULL
lm(freeny.y~freeny.x[,-4] +a)
but it does not work with a<-NULL, whereas
lm(freeny.y~freeny.x[,-4] +NULL)
I don't understand why and did not find an answer in the manuals... do
you see it? Any idea?
Thanks!!
2011 Jan 31
2
From data frame to list object
Dear all, let say I have following data frame:
> data.frame(x=rnorm(18), y=rep(c("a", "b", "c"), each=6))
x y
1 -1.072152537 a
2 0.382985265 a
3 0.058877377 a
4 -0.006911939 a
5 -2.355269051 a
6 -0.303095553 a
7 0.484038422 b
8 0.733928931 b
9 -1.136014346 b
10 0.503552090 b
11 1.708609658 b
12 -0.294599403 b
13
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