search for: ntti

Displaying 7 results from an estimated 7 matches for "ntti".

Did you mean: antti
2005 Feb 15
3
using poly in a linear regression in the presence of NA f ails (despite subsetting them out)
..., not for fitting the linear model itself. Essentially, calling model.frame(y ~ poly(x, 2), data=data.frame(x=c(NA, 1:3), y=rnorm(4)), na.action=na.omit) would show the same error. The obvious workaround is to omit cases with NAs before calling lm(). Andy > From: Markus J?ntti > > I ran into a to me surprising result on running lm with an orthogonal > polynomial among the predictors. > > The lm command resulted in > > Error in qr(X) : NA/NaN/Inf in foreign function call (arg 1) > Error during wrapup: > > despite my using a "subset&...
2005 Feb 15
3
using poly in a linear regression in the presence of NA f ails (despite subsetting them out)
..., not for fitting the linear model itself. Essentially, calling model.frame(y ~ poly(x, 2), data=data.frame(x=c(NA, 1:3), y=rnorm(4)), na.action=na.omit) would show the same error. The obvious workaround is to omit cases with NAs before calling lm(). Andy > From: Markus J?ntti > > I ran into a to me surprising result on running lm with an orthogonal > polynomial among the predictors. > > The lm command resulted in > > Error in qr(X) : NA/NaN/Inf in foreign function call (arg 1) > Error during wrapup: > > despite my using a "subset&...
2003 Nov 25
3
weighted mean
How do I go about generating a WEIGHTED mean (and standard error) of a variable (e.g., expenditures) for each level of a categorical variable (e.g., geographic region)? I'm looking for something comparable to PROC MEANS in SAS with both a class and weight statement. Thanks. Marc [[alternative HTML version deleted]]
2002 Jul 17
1
editing Sweave files in xemacs with ess (noweb), auctex and reftex
...d by the Sweave manual FAQ. While this most likely involves reftex/ess interaction, I wondered if someone on these lists is successfully using the combination AUCTeX LaTeX-mode/bib-cite/reftex in xemacs 21.4.8 and ess 5.1.20 (on a GNU/Linux Debian unstable system). Regards, Markus -- Markus Jantti Statistics Finland and University of Tampere markus.jantti at iki.fi http://www.iki.fi/~mjantti -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or &q...
2003 Feb 12
2
rbind.data.frame: character comverted to factor
...str(d3) # <- id is factor d1[["id"]] <- as.character(d1[["id"]]) d2[["id"]] <- as.character(d2[["id"]]) d3 <- rbind(d1, d2) str(d1) # <- id is character str(d2) # <- id is character str(d3) # <- id is factor Regards, Markus -- Markus J?ntti <markus.jantti at iki.fi> Statistics Finland
2009 Jul 13
7
[ANNOUNCEMENT] cran2deb: 1700+ new Debian / R packages
Announcing cran2deb: 1700+ Debian packages from almost all of CRAN ------------------------------------------------------------------ Last Friday's presentation at UseR! 2009 was the first really public mention of 'cran2deb'. It provides Debian packages of all of CRAN. It started as Charles' project from last year's Google Summer of Code, was further extended by us over the
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame. For instance > ddTable <- data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry")) I want a dataset that is Id Name 1 Paul 2 Bob > unique(ddTable) Will give me all 4 rows, and > unique(ddTable$Id) Will give me c(1,2), but not accompanied by the name column.