[R] summary() after changing contrasts

2012-08-09 Thread Daniel Weitzenfeld
Hi, After running a regression on a factor variable, summary() reports the coefficients 'nicely,' ie, labelled with a string that is a concatenation of the variable name and the factor label. However, changing the base case a la contrasts(variable)-contr.treatment(N, base=x) results in the

[R] RODBC with MySQL sees tables, but queries return zero rows

2011-04-14 Thread Daniel Weitzenfeld
Hi All, I'm using RODBC to tap into MySQL on a remote server. It appears like the connection is successful: I can see all tables and columns in my database. However, queries return zero lines, including queries I've verified as functional and non-empty by entering them directly in MySQL. I

[R] symmetric ( square) contingency table from dataset of unordered pairs

2011-03-24 Thread Daniel Weitzenfeld
Hi Everybody, I have a data set in which each observation has a pair of students, with each kid id'd by a 4 digit number: head(PAIRS) student1 student2 2 2213 2200 4 2198 2195 5 2199 2191 6 2229 2221 7 2247 2249 8 2250 2263 There is no

[R] Optimal Y=q cutoff after logistic regression

2011-02-13 Thread Daniel Weitzenfeld
Hi, I understand that dichotimization of the predicted probabilities after logistic regression is philosophically questionable, throwing out information, etc. But I want to do it anyway. I'd like to include as a measure of fit % of observations correctly classified because it's measured in

[R] cv.lm only bivariate; other options for prediction intervals

2010-10-22 Thread Daniel Weitzenfeld
Hi Folks, I have a pretty simple problem: after building a multivariate linear model, I need to report my 95% confidence interval for predictions based on future observations. I tried doing K-fold cross validation using cv.lm() from the DAAG package, but it currently only uses the first

[R] cv.lm() broken; cross validation vs. predict(interval=prediction)

2010-10-22 Thread Daniel Weitzenfeld
repost because previous attempt was not plain text, sorry! Hi Folks, I have a pretty simple problem: after building a multivariate linear model, I need to report my 95% confidence interval for predictions based on future observations. I know that one option is to use

[R] is get() really what I want here?

2010-10-19 Thread Daniel Weitzenfeld
# Let's say I have 5 objects, object_1, object_2, etc. for (i in 1:5) { assign(paste(object_,i, sep=), i+500) } # Now, for whatever reason, I don't know the names of the objects I've created, but I want to operate on them. list-ls(pattern=^obj) #Is get best? for (l in list) { cat(\n, l,

Re: [R] is get() really what I want here?

2010-10-19 Thread Daniel Weitzenfeld
and number of observations). HTH, Josh On Tue, Oct 19, 2010 at 10:29 PM, Daniel Weitzenfeld dweitzenf...@gmail.com wrote: # Let's say I have 5 objects, object_1, object_2, etc. for (i in 1:5) { assign(paste(object_,i, sep=), i+500) } # Now, for whatever reason, I don't know