similar to: omitting coefficients in summary.lm()

Displaying 20 results from an estimated 7000 matches similar to: "omitting coefficients in summary.lm()"

2005 Oct 20
5
spliting an integer
Hi there, From the vector X of integers, X = c(11999, 122000, 81997) I would like to make these two vectors: Z= c(1999, 2000, 1997) Y =c(1 , 12 , 8) That is, each entry of vector Z receives the four last digits of each entry of X, and Y receives "the rest". Any suggestions? Thanks in advance, Dimitri [[alternative HTML version deleted]]
2005 Oct 25
2
Inf in regressions
Hi, Suppose I I wish to run lm( y ~ x + z + log(w) ) where w assumes non-negative values. A problem arises when w=0, as log(0) = -Inf, and R doesn't accept that (as it "accepts" NA). Is there a way to tell R to do with -Inf the same it does with NA, i.e, to ignore it? ( Otherwise I have to do something like w[w==0] <- NA which doesn't hurt, but might be a bit
2007 Apr 06
2
lm() intercept at the end, rather than at the beginning
Hi, I wonder if someone has already figured out a way of making summary(mylm) # where mylm is an object of the class lm() to print the "(Intercept)" at the last line, rather than the first line of the output. I don't know about, say, biostatistics, but in economics the intercept is usually the least interesting of the parameters of a regression model. That's why, say, Stata
2006 Jan 26
1
efficiency with "%*%"
Hi, x and y are (numeric) vectors. I wonder if one of the following is more efficient than the other: x%*%y or sum(x*y) ? Thanks, Dimitri Szerman
2006 Apr 29
1
splitting and saving a large dataframe
Hi, I searched for this in the mailing list, but found no results. I have a large dataframe ( dim(mydata)= 1297059 16, object.size(mydata= 145280576) ) , and I want to perform some calculations which can be done by a factor's levels, say, mydata$myfactor. So what I want is to split this dataframe into nlevels(mydata$myfactor) = 80 levels. But I must do this efficiently, that is, I
2006 Jul 05
1
creating a data frame from a list
Dear all, I have a list with three (named) numeric vectors: > lst = list(a=c(A=1,B=8) , b=c(A=2,B=3,C=0), c=c(B=2,D=0) ) > lst $a A B 1 8 $b A B C 2 3 0 $c B D 2 0 Now, I'd love to use this list to create the following data frame: > dtf = data.frame(a=c(A=1,B=8,C=NA,D=NA), + b=c(A=2,B=3,C=0,D=NA), + c=c(A=NA,B=2,C=NA,D=0) ) > dtf a b
2006 Jul 12
1
help in vectorization
Hi, I have two data frames. One is like > dtf = data.frame(y=c(rep(2002,4), rep(2003,5)), + m=c(9:12, 1:5), + def=c(.74,.75,.76,.78,.80,.82,.85,.85,.87)) and the other dtf2 = data.frame(y=rep( c(2002,2003),20), m=c(trunc(runif(20,1,5)),trunc(runif(20,9,12))), inc=rnorm(40,mean=300,sd=150) ) What I want is to divide
2005 Jun 09
1
getting more than the coefficients
Hi there, I am trying to export a regression output to Latex. I am using the xtable function in the xtable library. Doing myfit <- lm(myformula, mydata) print.xtable(xtable(myfit), file="myfile") only returns the estimated coefficients and the correspondent standard erros, t-statiscs and p-values. But I wish to get a bit more, say, the number of observations used in the
2005 Jun 24
2
Gini with frequencies
Hi there, I am trying to compute Gini coefficients for vectors containing income classes. The data I possess look loke this: yit <- c(135, 164, 234, 369) piit <- c(367, 884, 341, 74 ) where yit is the vector of income classes, and fit is the vector of associated frequencies.(This data is from Rustichini, Ichino and Checci (Journal of Public Economics, 1999) ). In ineq pacakge, Gini( )
2007 Apr 05
2
creating a data frame from a list
Dear all, A few months ago, I asked for your help on the following problem: I have a list with three (named) numeric vectors: > lst = list(a=c(A=1,B=8) , b=c(A=2,B=3,C=0), c=c(B=2,D=0) ) > lst $a A B 1 8 $b A B C 2 3 0 $c B D 2 0 Now, I'd love to use this list to create the following data frame: > dtf = data.frame(a=c(A=1,B=8,C=NA,D=NA), +
2006 Apr 26
1
help using tapply
Dear R-mates, # Here's what I am trying to do. I have a dataset like this: id = c(rep(1,8), rep(2,8)) dur1 <- c( 17,18,19,18,24,19,24,24 ) est1 <- c( rep(1,5), rep(2,3) ) dur2 <- c(1,1,3,4,8,12,13,14) est2 <- rep(1,8) mydata = data.frame(id, estat=c(est1, est2), durat=c(dur1, dur2)) # I want to one have this: id = c(rep(1,8), rep(2,8))
2009 May 12
2
import HTML tables
Hello, I was wondering if there is a function in R that imports tables directly from a HTML document. I know there are functions (say, getURL() from {RCurl} ) that download the entire page source, but here I refer to something like google document's function importHTML() (if you don't know this function, go check it, it's very useful). Anyway, if someone of something that does this
2009 Nov 15
1
R crashing
Hello, This is what I am trying to do: I wrote a little function that takes addresses (coordinates) as input, and returns the road distance between every two points using Google Maps. Catch is, there are 2000 addresses, so I have to get around 2x10^6 addresses. On my first go, this is what I did: ######################################### getRoadDist = function(X,complete=F){ # X must be a
2018 Jun 01
1
rasterize SpatialPolygon object using a RasterBrick object
I am trying to rasterize a SpatialPolygon object by a RasterBrick object. The documentation of the raster::rasterize function explicitly says this is allowed. Here's what I am doing # load the raster package library("raster") # create a raster brick object using the example from the brick function documentation b <- brick(system.file("external/rlogo.grd",
2009 Feb 23
3
Help in writing my own function
Dear all I am very intersted in writing my own function to deal with some complicated task, but I don't know how to start. I can't find detial material with examples teaching me how to write my own functions. Can anyone help me and recommend me some learning material? Many Thanks Ted -- View this message in context:
2001 Aug 05
2
Just out of interest whats this?
FIXME:pthread_rwlock_rdlock FIXME:pthread_rwlock_unlock what's this, what's causing it and what needs fixing (I'll give it a look if it's needed) or is it just an old error that dosn't really need fixing (I can run almost everything I want to and the all show this error) just intersted Rob
2006 Mar 03
3
memory once again
Dear all, A few weeks ago, I asked this list why small Stata files became huge R files. Thomas Lumley said it was because "Stata uses single-precision floating point by default and can use 1-byte and 2-byte integers. R uses double precision floating point and four-byte integers." And it seemed I couldn't do anythig about it. Is it true? I mean, isn't there a (more or less
2006 Mar 05
1
duration analysis
Hi, I am trying to estimate the effects of covariates on the hazard function, rather than on the survival. I know this is actually the same thing. For example, using the survival package, and doing: > myfit <- survreg( Surv(time, event) ~ mymodel ) all I have to do to get the quantities of my interest is > -myfit$coefficients/myfit$scale The standard erros are easily worked out, as
2007 Apr 28
1
RWinEdt and Windows Vista
Hi, I have a new computer with Windows Vista and I am trying to use RWinEdt, which I have always used. I am using R version 2.5. The installation of the RWinEdt library is funny. First, it didn't install at all. Then, I uninstalled/reinstalled both R and WinEdt, downloaded the package again from the CRAN repositary, got some error messages, but RWinEdt initialized. I closed R and WinEdt,
2004 Aug 30
2
Suitable for Dynamic IVR Platform?
New to asterisk so please be gentle. I'm guessing I'm among a number of recent additions to the list after the article in Linux Mag. I gotta say I'm *very* intersted in the project and will be doing lots of reading shortly. A couble quick questions first... How suitable is Asterisk for use as an IVR providing callers with textual data out of a database? Can it be combined easily