search for: gnp

Displaying 20 results from an estimated 39 matches for "gnp".

Did you mean: gfp
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) Cal...
2017 Sep 13
3
vcov and survival
...Even the behaviour of lm() and glm() isn't entirely consistent. 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: (...
2011 Dec 21
1
matrix multivariate bootstrap: order of results in $t component
...ovide reproducible code.] I'm doing a multivariate bootstrap, using boot::boot(), where the output of the basic computation is a k x p matrix of coefficients, representing a tuning constant x variable, as shown in the $t0 component from my run, giving a 3 x 6 matrix > lboot$t0 GNP Unemployed Armed.Forces Population Year GNP.deflator 0.00 -3.4472 -1.828 -0.6962 -0.34420 8.432 0.15738 0.01 -0.1798 -1.361 -0.5881 -1.00317 5.656 -0.02612 0.08 1.0907 -1.086 -0.4583 -0.08596 2.642 0.57025 > ?boot doesn't say how these are s...
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. Approach: sctest(gefp(Employed ~ Year + GNP.deflato...
2017 Sep 14
0
vcov and survival
...r of lm() and glm() isn't entirely consistent. 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 >...
2017 Sep 14
6
vcov and survival
...) and glm() isn't entirely consistent. 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...
2010 Feb 25
1
How to do: Correlation with "blocks" (or - "repeated measures" ?!) ?
...so, here is a short dummy code to give an idea of what I am talking about: attach(longley) N <- length(Unemployed) block <- c( rep( "a", N), rep( "b", N), rep( "c", N) ) Unemployed.3 <- c(Unemployed + rnorm(1), Unemployed + rnorm(1), Unemployed + rnorm(1)) GNP.deflator.3 <- c(GNP.deflator + rnorm(1), GNP.deflator + rnorm(1), GNP.deflator + rnorm(1)) cor(Unemployed, GNP.deflator) cor(Unemployed.3, GNP.deflator.3) cor(Unemployed.3[block == "a"], GNP.deflator.3[block == "a"]) cor(Unemployed.3[block == "b"], GNP.deflator.3[b...
2017 Sep 14
0
vcov and survival
...sistent. 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) > > >> Residual...
2017 Nov 02
2
vcov and survival
...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) >> >> >> Residua...
2017 Sep 14
0
vcov and survival
...; 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...
2011 Aug 23
1
obtaining p-values for lm.ridge() coefficients (package '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 GNP Unemployed Armed.Forces Population Year -1620.429355 0.021060 0.007994 -0.013146 -0.007752 -0.101880 0.869116 But how does one obtain the customary 'lm' summary information for the model above? I tried supplying the chosen lambda to Design...
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...
2008 Feb 09
2
Reading data from a dataframe
...y entering pol572a1<- read.dta("C:\\alex\\Graduate Coursework\\Pol 572\\pol572a1.dta") So now I can do a few things with the data, but I am only able to do so by entering with(pol572a1, before typing another command. So I enter the following for a scatter plot: with(pol572a1, plot(rgnpc, incmean)) When I run a simple linear regression, I enter the following: with(pol572a1, lm(incmean~rgnpc)) But when try to get a fitted line, I enter the following: with(pol572a1, lm( share.gnp)<-lm(incmean~rgnpc)) But I get the following error message: Error in lm(share.gnp) <- lm(incmea...
2005 Aug 24
1
lm.ridge
...X'y and if a take k=Ridge$kHKV, Coef should be approx equal to Ridge$Coef[near value of kHKV] and it does not seem to happen, why? Values: > Ridge$kHKB [1] 0.004275357 Using the calculation above (third question, third point): Coef= [,1] 1 -0.095492310 GNP.deflator -0.052759002 GNP 0.070993540 Unemployed -0.004244391 Armed.Forces -0.005725582 Population -0.413341544 Year 0.048420107 And if I take from Ridge&coef: Ridge$coef[0.004] GNP.deflator -0.03098507 GNP -1.32553151 Unemployed -1.53237769 Armed.Forces -0.63...
1997 Oct 21
1
R-beta: More Time series in the same plot
I can plot a time series with: gnp <- ts(cumsum(1+round(rnorm(100), 2)), start=c(1954,7), frequency=12) plot(gnp) But I want to plot more time series in the same plot. How can I do it? =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/...
2007 May 15
1
urca package - summary method -
Hi I am using the package urca and I am interested about the KPSS test. That works fine except the method "summary" did not work in the script, only when it is typed direct in the console the results are shown( not a source file). Is there any problem with these method ?
2009 Jan 31
1
FW: can't get package boot to load
...the obvious. My code is simple: install.packages('RODBC') install.packages('boot') library(RODBC,boot) setwd("C:/Documents and Settings/Gary Smith/My Documents/Blog/") data = odbcConnectExcel("LafferCurve2.xls") mydata = sqlFetch(data,"Data") n=23 m=73 gnp=mydata[[3]][n:m] incTaxFirst=mydata[[7]][n:m] corr(cbind(gnp,incTax)) Here are the console messages: > install.packages('RODBC') Warning: package 'RODBC' is in use and will not be installed > install.packages('boot') trying URL 'http://cran.stat.ucla.edu/bin/wind...
2011 Aug 06
0
ridge regression - covariance matrices of ridge coefficients
...uot; 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.361047 -0.5881396 -1.00316772 5.656287 -0.02612152 0.020 0.4994945...
2011 Dec 06
1
About summary in linear models
...e to know if is there some function to obtain a extended summary like in Gretl. I will write a example in Gretl Modelo 1: MCO, usando las observaciones 1968-1982 (T = 15) Variable dependiente: Invest Coeficient St error t-ratio p-value const 377,631 35,0955 10,7601 <0,00001 *** GNP 0,63612 0,055015 11,5627 <0,00001 *** CPI -9,70228 0,913737 -10,6182 <0,00001 *** Interest -0,941363 2,21077 -0,4258 0,67927 time 8,49182 3,18142 2,6692 0,02353 ** Average of Dep Var. 276,0067 St Error Dep. Var 117,5827 Squared Sum of remainders 818,6362...
2008 Feb 09
1
R is not reading(?) my data properly
...y entering pol572a1<- read.dta("C:\\alex\\Graduate Coursework\\Pol 572\\pol572a1.dta") So now I can do a few things with the data, but I am only able to do so by entering with(pol572a1, before typing another command. So I enter the following for a scatter plot: with(pol572a1, plot(rgnpc, incmean)) When I run a simple linear regression, I enter the following: with(pol572a1, lm(incmean~rgnpc)) But when try to get a fitted line, I enter the following: with(pol572a1, lm( share.gnp)<-lm(incmean~rgnpc)) But I get the following error message: Error in lm(share.gnp) <- lm(incmea...