similar to: argh .. if/else .. why?

Displaying 20 results from an estimated 3000 matches similar to: "argh .. if/else .. why?"

2010 Jan 10
1
lme4 and function 'cholmod_start' not provided by package 'Matrix' / Ubuntu
Hello all, Using Ubuntu 9.04 and R 2.8.1. For a project I need to use the Zelig package, which in turn wants to use the lme4 package. When trying to use Zelig and it tries to its required packages I get the following error message. Error in dyn.load(file, DLLpath = DLLpath, ...) : function 'cholmod_start' not provided by package 'Matrix' Error in loadModelDeps(model) :
2013 Mar 05
2
Zelig package: Coxph model problems
Hi, I'm having problems with the Zelig package - when using the below R displays the follwing message (I'm running R i386 2.15.3 for Windows and have updated all the Zelig packages): z.out<-zelig(Surv(psurv2, pcens2) ~ ren_sup3 + age, data=data_urgent, model="coxph") ** The model "coxph" is not available with the currently loaded packages, ** and is not an
2004 Jun 25
2
R 1.9.1 package installation problems
Hello, I am writing as an administrator, not as an R user, so forgive me if I am not completely knowledgeable about R. I have a user who is creating an R package for windows from a Linux environment using the crossbuild environment by Jun Yan and A.J. Rossini. The packages she generated worked fine until she tried to install in R 1.9.1 for Windows. Now when she installs with
2009 Oct 30
1
Package zelig
hello all I am using the R package Zelig for some tobit regression with robust standard errors. I have got R version 2.9.2 (2009-08-24) and Zelig Version: 3.4-5 when i do demo(robust) It ends like this way data(coalition) > # Fit the model with robust standard error > user.prompt() Press <return> to continue: > z.out3 <- zelig(Surv(duration, ciep12) ~ polar + numst2 +
2007 Nov 01
1
Zelig and the "blogit" model
Hi Folks, According to the PDF file blogit.pdf in the Zelig documentation: "Use the bivariate logistic regression model ["blogit"] if you have two binary dependent variables (Y1,Y2), and and wish to model them jointly as a function of some explanatory variables. Each pair of dependent variables (Yi1,Yi2) has four potential outcomes, (Yi1=1,Yi2=1), (Yi1=1,Yi2=0),
2009 Apr 13
2
joint estimation of two poisson equations
Dear list members, Is there a package somewhere for jointly estimating two poisson processes? I think the closest I've come is using the "SUR" option in the Zelig package (see below), but when I try the "poisson" option instead of the "SUR" optioin I get an error (error given below, and indeed, reading the documentation of the Zelig package, I get the impression
2009 Apr 19
3
flip certain bits in vector
I have a string of binary values, and I would like to flip certain bits in a set of positions. Let's say the vector p contains position [1, 3, 5, 7] vector b contains bits [1, 0, 1, 0, 1, 0, 1, 0, 1, 0] result r should be [0, 1, 0, 0, 0, 0, 0, 0, 1, 0] in pseudo code this would be something like --- r = c() for (i in 1:10) if (i in p) r = c(r, flip[i]) r ----
2009 Aug 28
6
Google's R Style Guide
Perhaps most of you have already seen this? http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html Comments/Critiques? Thanks, Esmail ps: Reminds me of PEP 8 for Python http://www.python.org/dev/peps/pep-0008/ Maybe not that surprising since Python is also one of the main languages used by Google.
2008 May 09
2
which.max2()
Hello, which.max() only returns one index value, the one for the maximum value. If I want the two index values for the two largest values, is this a decent solution, or is there a nicer/better R'ish way? max2 <-function(v) { m=which.max(v) v[m] = -v[m] m2=which.max(v) result=c(m, m2) result } Seems to work ok. Thanks, Esmail
2010 Mar 29
1
Question about 'logit' and 'mlogit' in Zelig
I'm running a multinomial logit in R using the Zelig packages. According to str(trade962a), my dependent variable is a factor with three levels. When I run the multinomial logit I get an error message. However, when I run 'model=logit' it works fine. any ideas on whats wrong? ## MULTINOMIAL LOGIT anes96two <- zelig(trade962a ~ age962 + education962 + personal962 + economy962 +
2007 May 26
1
How to get the "Naive SE" of coefficients from the zelig output
Dear R-user: After the fitting the Tobit model using zelig, if I use the following command then I can get the regression coefficents: beta=coefficients(il6.out) > beta (Intercept) apache 4.7826 0.9655 How may I extract the "Naive SE" from the following output please? > summary(il6w.out) Call: zelig(formula = il6.data$il6 ~ il6.data$apache, model =
2008 Apr 11
1
Multinomial Logit Regression
Hi all, I have a dataset with a response variable with three categories (1, 2, 3) and a lot of continuous variables. I'd like to make a MLR with these variables. I've been watching the libraries nnet and zelig for this purpose but I don't understand them well. I use a training sample data to make the MLR. train.set <- sample(1:1000,1000*0.7) I have done this: library(nnet) net
2008 Jun 12
3
Adding new columns to (output) data - e.g., read 5 cols write 8
Hello, I have the following task I'd like to accomplish: A file contains 5 columns of data (several hundred rows), let's call them a, b, c, d and e (ie these are their column headers) I also have a set of definitions, e.g., f = a + b g = a * 3 h = c + d etc. I would like to write out a new .rda file that contains columns a b c d e f g h etc. I.e. , the original data plus new columns
2009 Apr 27
3
Formatting numbers
I've been trough the R documentation for about half an hour and it's not clear to me how to do this: I need to format to character a series of integers from 1 to 1000, and I like them to look like "0001" "0002", "0059", "0123" and so on. Padded with zeroes to have four digits. Cheers! Mario. r-help-request at r-project.org wrote: > Send
2008 May 07
1
Automatically generating new column names (and columns)
Once again I need to tap into the collective knowledge here. Let's say I have the following columns and data below Y X1 X2 X3 X4 I would like to generate additional new columns and column names (ie the data would be squared - and I'd like the column names to reflect this) like: Y X1 X2 X3 X4 X1^2 X2^2 X3^2 X4^2 I believe I can compute the values correctly with the code below, but I
2009 Oct 13
1
How to specify an ARMA(1, [1,4]) model?
Hi, I'm trying to model an ARMA(1,[1,4]), i.e. I want only lags 1 and 4 of the Moving Average part. It's the '[1,4]' part that is giving me a problem. I've tried different arma's and arima's in different packages, namely: packages tseries, fArma, FinTS, timeSeries, TSA, Zelig, ds1, forecast For example, with package FinTS: > ( ARIMA(y, order=c(1,0,c(1,4))) )
2001 Jan 14
2
Help
Dear sir, I am using R in windows. I want to extend R Memory size. I use the following command, but unfortunately it doesn't work. -- vsize=15M --nsize=1000K Your help is appreciated. Thanks, Esmail Amiri. __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
2009 Apr 26
4
comparing matrices
I'm trying to compare two matrices made up of bits. doing a simple comparison of matA == matB yields this sort of output. [,1] [,2] [,3] [,4] [,5] [,6] [1,] FALSE TRUE FALSE TRUE TRUE FALSE [2,] TRUE TRUE TRUE TRUE TRUE TRUE [3,] FALSE TRUE FALSE FALSE FALSE TRUE [4,] FALSE TRUE TRUE FALSE FALSE FALSE [5,] TRUE TRUE TRUE TRUE FALSE FALSE [6,] TRUE TRUE
2010 Feb 24
2
sprintf + integer(0) problem
Hello all, I am stuck with R v2.8.0 under Linux for the time being and I am running into a small problem that doesn't exist under 2.9.x and 2.10.x with sprintf. If I have the following code segment to help me determine the column number for a specific column header/label: nn = names(Dataset) s = "Group" c = which(nn==s) cat(sprintf('found %s in col %d\n', s, c))
2011 Apr 26
2
Wish R Core had a standard format (or generic function) for "newdata" objects
Is anybody working on a way to standardize the creation of "newdata" objects for predict methods? When using predict, I find it difficult/tedious to create newdata data frames when there are many variables. It is necessary to set all variables at the mean/mode/median, and then for some variables of interest, one has to insert values for which predictions are desired. I was at a