search for: longley

Displaying 20 results from an estimated 31 matches for "longley".

Did you mean: langley
2005 Aug 24
1
lm.ridge
Hello, I have posted this mail a few days ago but I did it wrong, I hope is right now: I have the following doubts related with lm.ridge, from MASS package. To show the problem using the Longley example, I have the following doubts: First: I think coefficients from lm(Employed~.,data=longley) should be equal coefficients from lm.ridge(Employed~.,data=longley, lambda=0) why it does not happen? Second: if I have for example Ridge<-lm.ridge(Employed~., data=longley, lambda = seq(0,0.1,0.0...
2011 Jan 04
5
scoping/non-standard evaluation issue
Dear r-devel list members, On a couple of occasions I've encountered the issue illustrated by the following examples: --------- snip ----------- > mod.1 <- lm(Employed ~ GNP.deflator + GNP + Unemployed + + Armed.Forces + Population + Year, data=longley) > mod.2 <- update(mod.1, . ~ . - Year + Year) > all.equal(mod.1, mod.2) [1] TRUE > > f <- function(mod){ + subs <- 1:10 + update(mod, subset=subs) + } > f(mod.1) Call: lm(formula = Employed ~ GNP.deflator + GNP + Unemployed + Armed.Forces + Populat...
2011 Oct 09
1
strucchange Nyblom-Hansen Test?
I want to apply Nyblom-Hansen test with the strucchange package, but I don't know how is the correct way and what is the difference between the following two approaches (leeding to different results): data("longley") # 1. Approach: sctest(Employed ~ Year + GNP.deflator + GNP + Armed.Forces, data = longley, type = "Nyblom-Hansen") #results in: # Score-based CUSUM test with mean L2 norm # #data: Employed ~ Year + GNP.deflator + GNP + Armed.Forces #f(efp) = 0.8916, p-value = 0.4395 #2....
2004 Mar 24
6
First Variable in lm
Hi all, I just cannot think of how to do it: I want to take the first variable (column) of a data frame and regress it against all other variables. bla <- function (dat) { reg <- lm(whateverthefirstofthevariablenamesis ~., data=dat) return(reg) } What kind of function do I have to take instead of the whateverthefirstofthevariablenamesis, eval(), substitute(), get(), ... to
2005 Mar 29
1
improved pairs.formula?
Dear all, I would like to suggest changing the pairs.formula command such that a command like pairs(GNP ~ . - Year - GNP.deflator, longley) would behave in a similar fashion as lm(GNP ~ . - Year - GNP.deflator, longley) i.e., make a pairwise scatterplot of GNP and all other variables in the (longley) dataframe except for Year and GNP.deflator. The above command, with the current version of pairs.formula, produces a pairwi...
2003 Nov 03
2
hclust doesn't return merge details
Dear R-users, I tried to receive the merge details of a clustering by using the summary function of hclust. For illustration I use the Longley data as done by Prof Ripley (Wed 11 Apr 2001) d <- dist(longley.y) d <- d/max(d) hc <- hclust(d, "ave") But instead of getting a matrix for $merge I get: >summary(hc) Length Class Mode merge 30 -none- numeric height 15 -none- numeric order...
2017 Sep 13
3
vcov and survival
...stent. In both cases, singularity results in NA coefficients by default, and these are reported in the model summary and coefficient vector, but not in the coefficient covariance matrix: ---------------- > mod.lm <- lm(Employed ~ GNP + Population + I(GNP + Population), + data=longley) > summary(mod.lm) Call: lm(formula = Employed ~ GNP + Population + I(GNP + Population), data = longley) Residuals: Min 1Q Median 3Q Max -0.80899 -0.33282 -0.02329 0.25895 1.08800 Coefficients: (1 not defined because of singularities) Estim...
2003 Nov 04
1
hclust doesn't return merge details [Solved]
...esn't return merge details > > > > From: Arne Neumann [mailto:an980634 at uni-greifswald.de] > > > > Dear R-users, > > > > I tried to receive the merge details of a clustering by using the > > summary function of hclust. For illustration I use the Longley data as > > > done by Prof Ripley (Wed 11 Apr 2001) d <- > > dist(longley.y) > > d <- d/max(d) > > hc <- hclust(d, "ave") > > > > But instead of getting a matrix for $merge I get: > > >summary(hc) > > Length Class Mode...
2002 Jun 17
3
Help
Can you please tell me the minimum system spec for R on a windows machine? Thanks _______________________________________ Matthew Longley IT Administrator Zoological Society of London Regent's Park London NW1 4RY Charity No: 208728 Tel: 020 74496412 Fax: 020 74496294 email: Matthew.Longley at zsl.org WWW: www.zsl.org _______________________________________ ---------------------------------------------------------------------...
2011 Aug 23
1
obtaining p-values for lm.ridge() coefficients (package 'MASS')
Dear all I'm familiarising myself with Ridge Regressions in R and the following is bugging me: How does one get p-values for the coefficients obtained from MASS::lm.ridge() output (for a given lambda)? Consider the example below (adapted from PRA [1]): > require(MASS) > data(longley) > gr <- lm.ridge(Employed ~ .,longley,lambda = seq(0,0.1,0.001)) > plot(gr) > select(gr) modified HKB estimator is 0.004275 modified L-W estimator is 0.0323 smallest value of GCV at 0.003 > ##let's choose 0.03 for lambda > coef(gr)[gr$lam == 0.03,] GNP.deflator...
2017 Sep 14
0
vcov and survival
...ularity results in NA coefficients by default, and these are reported in the model summary and coefficient vector, but not in the coefficient covariance matrix: > ---------------- >> mod.lm <- lm(Employed ~ GNP + Population + I(GNP + Population), > + data=longley) >> summary(mod.lm) > Call: > lm(formula = Employed ~ GNP + Population + I(GNP + Population), > data = longley) > Residuals: > Min 1Q Median 3Q Max > -0.80899 -0.33282 -0.02329 0.25895 1.08800 > Coefficients: (1 n...
2017 Sep 14
6
vcov and survival
...lts in NA coefficients by default, and these are reported in the model summary and coefficient vector, but not in the coefficient covariance matrix: >> ---------------- >>> mod.lm <- lm(Employed ~ GNP + Population + I(GNP + Population), >> + data=longley) >>> summary(mod.lm) >> Call: >> lm(formula = Employed ~ GNP + Population + I(GNP + Population), >> data = longley) >> Residuals: >> Min 1Q Median 3Q Max >> -0.80899 -0.33282 -0.02329 0.25895 1.08800...
2017 Sep 14
0
vcov and survival
..., and these are reported > in the model summary and coefficient vector, but not in the coefficient > covariance matrix: > > >> ---------------- > > >>> mod.lm <- lm(Employed ~ GNP + Population + I(GNP + Population), > >> + data=longley) > >>> summary(mod.lm) > > >> Call: > >> lm(formula = Employed ~ GNP + Population + I(GNP + Population), > >> data = longley) > > >> Residuals: > >> Min 1Q Median 3Q Max > >> -0....
2017 Nov 02
2
vcov and survival
...ported in the model summary and coefficient vector, but >> not in the coefficient covariance matrix: >> >> >> ---------------- >> >> >>> mod.lm <- lm(Employed ~ GNP + Population + I(GNP + >> Population), >> + data=longley) >>> summary(mod.lm) >> >> >> Call: >> lm(formula = Employed ~ GNP + Population + >> I(GNP + Population), >> data = longley) >> >> >> Residuals: >> Min 1Q Median 3Q Max >> -0.80899 >> -0.33282...
2017 Sep 14
0
vcov and survival
...gt; in the model summary and coefficient vector, but not in the coefficient > covariance matrix: > > > > >> ---------------- > > > > >>> mod.lm <- lm(Employed ~ GNP + Population + I(GNP + Population), > > >> + data=longley) > > >>> summary(mod.lm) > > > > >> Call: > > >> lm(formula = Employed ~ GNP + Population + I(GNP + Population), > > >> data = longley) > > > > >> Residuals: > > >> Min 1Q Me...
2011 Aug 06
0
ridge regression - covariance matrices of ridge coefficients
...=cov, mse=mse, scales=Xscale) class(result) <- "ridge" result } # Test: > lambda <- c(0, 0.005, 0.01, 0.02, 0.04, 0.08) > lambdaf <- c("", ".005", ".01", ".02", ".04", ".08") > lridge <- ridge(longley.y, longley.X, lambda=lambda) > lridge$coef GNP Unemployed Armed.Forces Population Year GNP.deflator 0.000 -3.4471925 -1.827886 -0.6962102 -0.34419721 8.431972 0.15737965 0.005 -1.0424783 -1.491395 -0.6234680 -0.93558040 6.566532 -0.04175039 0.010 -0.1797967 -1.36104...
2011 Mar 21
1
Curry with `[.function` ?
Dear all, I sometimes use the following function: Curry <- function(FUN,...) { # by Byron Ellis, https://stat.ethz.ch/pipermail/r-devel/2007-November/047318.html .orig <- list(...) function(...) do.call(FUN,c(.orig,list(...))) } ... and have thought it might be convenient to have a method for [ doing this. As a simple example, > apply(M, 1, mean[trim=0.1]) # hypothetical
2001 Aug 23
2
multiple correlation?
I'm looking for a function for the 'multiple correlation' but can not figure out what it is called in R by using the html search function. Maybe it is called in another way in english? I only know the german term? Can anyone help me? Thomas Pesl -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2005 Feb 02
4
(no subject)
...r Anderson's Iris Data iris3 Edgar Anderson's Iris Data islands Areas of the World's Major Landmasses ldeaths (UKLungDeaths) Monthly Deaths from Lung Diseases in the UK lh Luteinizing Hormone in Blood Samples longley Longley's Economic Regression Data lynx Annual Canadian Lynx trappings 1821-1934 mdeaths (UKLungDeaths) Monthly Deaths from Lung Diseases in the UK morley Michaelson-Morley Speed of Light Data mtcars Mo...
2010 Jun 14
0
areaplot
...t} and \code{polygon}.} } \value{ Matrix of cumulative sums that was used for plotting. } \author{ Arni Magnusson. } \seealso{ \code{\link{barplot}}, \code{\link{polygon}}. } \examples{ areaplot(rpois(10,40)) areaplot(rnorm(10)) # formula areaplot(Armed.Forces~Year, data=longley) areaplot(cbind(Armed.Forces,Unemployed)~Year, data=longley) # add=TRUE plot(1940:1970, 500*runif(31), ylim=c(0,500)) areaplot(Armed.Forces~Year, data=longley, add=TRUE) # matrix areaplot(WorldPhones) areaplot(WorldPhones, prop=TRUE) # table require(MASS) areaplot(table(Aids2$age))...