Re: [R] Fixed zeros in tables

2006-11-25 Thread Andrew Robinson
Hi Andrew, try the weights argument - apply zero weight to the structural zeros, and 1 elsewhere. Cheers Andrew On Sun, Nov 26, 2006 at 11:39:39AM +0700, A.R. Criswell wrote: > Hello All R Users, > > Function loglm() in library MASS can be cajoled to accomodate > structural zeros in a cross-cl

[R] plot p(Y=1) vs as

2006-11-25 Thread Aimin Yan
I am trying to fit a logistic regression model for this data set. Firstly, I want to plot P(Y=1) vs As and P(Y=1) vs Aa. Does any body know how to do these in R. Thanks, Aimin > p5 <- read.csv("http://www.public.iastate.edu/~aiminy/data/p_5_2.csv";) > str(p5) 'data.frame': 1030 obs. of 6 var

[R] Fixed zeros in tables

2006-11-25 Thread A.R. Criswell
Hello All R Users, Function loglm() in library MASS can be cajoled to accomodate structural zeros in a cross-classification table. An example from Fienberg demonstrates how this can be done. My question is: Can the function glm() perform the same task? Can glm() estimate a log-linear model with f

Re: [R] problem loading package Hmisc

2006-11-25 Thread Ritwik Sinha
Sorry about the question. I had installed the package locally and hence the library command was not working as stated. library(Hmisc, lib.loc="~/R/") did the trick. On 11/25/06, Ritwik Sinha <[EMAIL PROTECTED]> wrote: > Hi, > > I installed the package Hmisc with the command > install.packages("H

[R] problem loading package Hmisc

2006-11-25 Thread Ritwik Sinha
Hi, I installed the package Hmisc with the command install.packages("Hmisc") without errors. When I try to load the library with command library(Hmisc) I get the error > library(Hmisc) Error in library(Hmisc) : there is no package called 'Hmisc' > version _ platform i386-pc

Re: [R] My own correlation structure with nlme

2006-11-25 Thread Spencer Graves
I haven't seen a reply to this post, so I'll offer some comments, even though I can't answer the question directly. 1. Given your question, I assume you have consulted Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer). If you have not, I'm confident you wi

Re: [R] hausman Test

2006-11-25 Thread Ryuichi Tamura
Hi, Stefan web.de> writes: > > Does anyone know how to do an Hausman test? > > I´ve estimate a modell (some alternatives) with clogit an wanted to test the > IIA test (Independence of Irrelevant > Alternatives) after estimating a multinomial logit model? My (privately) package includes Hausm

Re: [R] cat not evaluated before file.choose

2006-11-25 Thread jim holtman
turn off the buffered write or use flush.console(). On 11/25/06, Kevin Middleton <[EMAIL PROTECTED]> wrote: > As part of a larger function I have code similar to the reduced > example below. The user is instructed to choose a file, which gets > read using read.csv. In this example, I just have the

[R] cat not evaluated before file.choose

2006-11-25 Thread Kevin Middleton
As part of a larger function I have code similar to the reduced example below. The user is instructed to choose a file, which gets read using read.csv. In this example, I just have the name of the file print out. When I call this function with choosefile(), the file dialog box appears befo

Re: [R] Fitting mixed-effects models with lme with fixed error term variances

2006-11-25 Thread Douglas Bates
On 11/22/06, Gregor Gorjanc <[EMAIL PROTECTED]> wrote: > Hello! > > Douglas Bates wrote: > > On 11/22/06, Gregor Gorjanc <[EMAIL PROTECTED]> wrote: > >> Douglas Bates wrote: > >> > On 11/21/06, Gregor Gorjanc <[EMAIL PROTECTED]> wrote: > >> >> Douglas Bates stat.wisc.edu> writes: > >> >> ...> > >>

Re: [R] IIA tests

2006-11-25 Thread Stefan
Hi Did you already know how to do an IIA test especial with Hausman? Thnak you __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provi

Re: [R] Multiple Conditional Tranformations

2006-11-25 Thread Muenchen, Robert A (Bob)
I have a program that is similar to your longer version, but I could never get the syntax quite right. This will be a big help in understanding how by works with functions. Thanks, Bob -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Saturday, November 25, 2006

Re: [R] vector problem

2006-11-25 Thread bunny , lautloscrew.com
thanks for your suggestions. S Poetry looks really amazing, but also a lot of work for me. I am pretty sure i´ll spent some hours over it.. (i should say weeks) :) thanks for the zoo tips also.. but somehow i found out my problems are elsewhere. i have to work with the following survey. people w

Re: [R] Nonlinear statistical modeling -- a comparison of R and AD Model Builder

2006-11-25 Thread Douglas Bates
On 11/24/06, dave fournier <[EMAIL PROTECTED]> wrote: > > >Dave > > Did you try supplying gradient information to nlminb? (I note that > nlminb is used for the optimization, but I don't see any gradient > information supplied to it.) I would suspect that supplying gradient > information w

Re: [R] alphachannel on pdf-device

2006-11-25 Thread Rainer Hurling
Thank you Paul Murrel for answering and thank you Brian Ripley for correcting this behaviour in R-patched. I am sorry, but I think there is just another 'misfeature' with transparent figures since R-2.4.0 and it seems not to be corrected in todays R-2.4.0 Patched (2006-11-24 r39989). In earl

Re: [R] Research Assistant Position

2006-11-25 Thread Anthony Westerling
I posted this job opportunity on November 20 (see below). I would like to provide some background on the position for those who might be interested. It is in the University of California at the new Merced campus. This is the second academic year since the Merced campus opened, and the first

Re: [R] low-variance warning in lmer

2006-11-25 Thread Douglas Bates
On 11/24/06, Ben Bolker <[EMAIL PROTECTED]> wrote: > For block effects with small variance, lmer will sometimes > estimate the variance as being very close to zero and issue > a warning. The "very close to zero" is merely a computational convenience. The theoretical lower bound on the variance c

Re: [R] trimming plotting area in a boxplot

2006-11-25 Thread Uwe Ligges
Patrick Kuss wrote: > Hello all, > > I am trying to trim the plotting area in a boxplot, such that the space > between the plot margins (left and right) are of identical size as > between the boxes. > In the example below I want to get rid of the space outside of the > abline(). > > I apprec

Re: [R] OT: P(Z <= -1.46).

2006-11-25 Thread Peter Dalgaard
Duncan Murdoch <[EMAIL PROTECTED]> writes: > My copy of the CRC standard mathematical tables give 0.0721, without > citation. > > > Could two algorithms ``reasonably'' disagree in the 4th decimal > > place? > > One possible source for this error (if it is an error), would be someone > rounding

Re: [R] Multiple Conditional Tranformations

2006-11-25 Thread Gabor Grothendieck
Here is a correction: do.call(rbind, by(mydata, 1:nrow(mydata), function(x) switch(as.character(x$gender), m = transform(x, score1 = 3*q1+q2, score2 = 3.5*q1+q2), f = transform(x, score1 = 2*q1+q2, score2 = 2.5*q1+q2), transform(x, score1 = NA, score2 = NA)) )) On 11/25/06, Gabor

Re: [R] OT: P(Z <= -1.46).

2006-11-25 Thread Gabor Grothendieck
Based on integration it appears that .0721 is correct. > integrate(function(x) exp(-x^2/2)/(2*pi)^.5, -Inf, -1.46) 0.07214504 with absolute error < 1.2e-07 On 11/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > In checking over the solutions to some homework that I had assigned I > observe

Re: [R] OT: P(Z <= -1.46).

2006-11-25 Thread Duncan Murdoch
On 11/25/2006 10:21 AM, [EMAIL PROTECTED] wrote: > In checking over the solutions to some homework that I had assigned I > observed the fact that in R (version 2.4.0) pnorm(-1.46) gives > 0.07214504. The tables in the text book that I am using for the > course give the probability as 0.0722. > >

Re: [R] Multiple Conditional Tranformations

2006-11-25 Thread Gabor Grothendieck
Here are some additional solutions. It appears that the SAS code is performing the transformation row by row and for each row the code in your post is specifying the transformation so if you want to do it that way we could use 'by' like this (where this time we have also added NA processing for th

[R] OT: P(Z <= -1.46).

2006-11-25 Thread rolf
In checking over the solutions to some homework that I had assigned I observed the fact that in R (version 2.4.0) pnorm(-1.46) gives 0.07214504. The tables in the text book that I am using for the course give the probability as 0.0722. Fascinated, I scanned through 5 or 6 other text books (amongs

[R] hausman Test

2006-11-25 Thread Stefan
Does anyone know how to do an Hausman test? I´ve estimate a modell (some alternatives) with clogit an wanted to test the IIA test (Independence of Irrelevant Alternatives) after estimating a multinomial logit model? Thank you __ R-help@stat.math.ethz.

Re: [R] Ryacas not working properly

2006-11-25 Thread Paul Smith
On 11/25/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Ryacas starts up yacas with an initialization file R.ys which puts > the server in a mode which outputs XML (which is what Ryacas reads). > It does that by specifying --init /whatever/R.ys on the yacas command line > when it is run. > > Y

Re: [R] Multiple Conditional Tranformations

2006-11-25 Thread Muenchen, Robert A (Bob)
That's exactly what I'm looking for. Thanks so much for taking the time to do it that way. On the redundancy issue, I think SAS checks the "else if" condition only if the original "if" is false. The check for f when not m I put in only to exclude missing values for gender. Thanks!! Bob -Ori

Re: [R] Ryacas not working properly

2006-11-25 Thread Gabor Grothendieck
Ryacas starts up yacas with an initialization file R.ys which puts the server in a mode which outputs XML (which is what Ryacas reads). It does that by specifying --init /whatever/R.ys on the yacas command line when it is run. You can run yacas without that init file or you can just enter into yac

Re: [R] Problems with updating R-packages

2006-11-25 Thread Reto Bürgin
Guten Tag Ich hab im R-Forum den Thread Re: [R] Problems with updating R-packages gefunden. Da ich das gleiche Problem (benütze ebenfalls die Linux Distribution Ubuntu) hatte und die Antworten darauf nicht hinreichend waren, habe ich selbst nach den Pakten umgesehen: Nach der Installation von

Re: [R] Multiple Conditional Tranformations

2006-11-25 Thread Gabor Grothendieck
Firstly your outline does not check once, it checks twice. First it check for "m" and then it redundantly checks for "f". On the other hand the two variations in my post do check once. Although substantially longer than the solutions in my prior posts, if you want the style shown in your post tr

Re: [R] Multiple Conditional Tranformations

2006-11-25 Thread Muenchen, Robert A (Bob)
Gabor, Those are handy variations! Perhaps my brain in still in SAS mode on this. I'm expecting something like the code below that checks for male only once, checks for female only when not male (skipping NAs) and does all formulas under the appropriate conditions. The formulas I made up to keep t

Re: [R] Diebold Mariano Test

2006-11-25 Thread Adrian Trapletti
Hello Graham Pls find attached some old R code for the Diebold Mariano test. The code is at least 6 years old and was not used in the meantime. Pls check first before using it. Best regards Adrian Dear List Has anyone used R to distnguish between alternative forecasting models? In particul

Re: [R] Ryacas not working properly

2006-11-25 Thread Paul Smith
On 11/19/06, Marc Schwartz <[EMAIL PROTECTED]> wrote: > this might be a firewall/SELinux/"On Demand Services" problem, I have, I > think, nailed it down to two key things on FC6: > > 1. It requires the use of the '--enable-server' configure option for > yacas itself. > > 2. There is a directory per

Re: [R] Using multiple objects in a for loop

2006-11-25 Thread Ales Ziberna
You should use assign("temp",get(on[j])) or just temp<-get(on[j]) as the on[j] IS just a character string. If you want to get the object with that name, use get. Ales Ziberna Daniel Yanosky pravi: > I have a situation where I want to perform the same manipulations to multiple > R objects in

Re: [R] predict and arima

2006-11-25 Thread Prof Brian Ripley
Part of the fit is the Kalman filter state after running the model forwards. Try reversing your series, fitting and then forecasting. You might have more success in understanding arima0. On Sat, 25 Nov 2006, Franck Arnaud wrote: > Hi all, > > Forecasting from an arima model is easy with predic