similar to: how to rbind matrices from different loops

Displaying 20 results from an estimated 1100 matches similar to: "how to rbind matrices from different loops"

2005 Nov 09
8
Element-by-element multiplication operator?
Is there an element-by-element multiplication in R, like the .* operator in Matlab? eg: A (2x3) B (2x3) C=A.*B C (2x3) C = [[a11*b11 a12*b12 a13*b13]; [a21*b21 a22*b22 a23*b23]] I can't find one... Thanks -Mike Gates
2007 Mar 10
3
long character string problem
Hi All I am having 2 very long character strings (550chars) and I want to put them as expressions together with c(). The problem is that I also get these double-quotes, as seen below in 'fct'. How can I remove these double-quotes? I tried as.name() but it did not work (because of size?). These are creating trouble with subsequent programs, which I tested with strings that for some
2008 Jun 23
3
Simulating Gaussian Mixture Models
Hi, Is there any package that I can use to simulate the Gaussian Mixture Model , which is a mixture modeling method that is widely used in statistical learning theory. I know there is a mclust, however, I think it is a little bit different from my problem. Thanks very much.. regards. -------------------------- Peng Jiang ?? Ph.D. Candidate Antai College of Economics &
2008 Jun 14
1
restricted coefficient and factor in linear regression.
Hi, my data set is data.frame(id, yr, y, l, e, k). I would like to estimate Lee and Schmidts (1993, OUP) model in R. My colleague wrote SAS code as follows: ** procedures for creating dummy variables are omitted ** ** di# and dt# are dummy variables for industry and time ** data a2; merge a1 a2 a; by id yr; proc sysnlin maxit=100 outest=beta2; endogenous y; exogenous l e k
2008 Nov 29
2
Reading mixed tables
Dear R buddies, This weekend I became interested in solving Google Code Jam problems using R. I guess R may work very well in this kind of contests but the input of file has been a problem for me. Take this case for example (http://code.google.com/codejam/contest/dashboard?c=agdjb2RlamFtchALEghjb250ZXN0cxjRzBQM), the files are usually of the form: A(number of lines for group 1) a11 a12 a13 a21
2010 Jan 07
1
faster GLS code
Dear helpers, I wrote a code which estimates a multi-equation model with generalized least squares (GLS). I can use GLS because I know the covariance matrix of the residuals a priori. However, it is a bit slow and I wonder if anybody would be able to point out a way to make it faster (it is part of a bigger code and needs to run several times). Any suggestion would be greatly appreciated. Carlo
2006 Dec 31
7
zero random effect sizes with binomial lmer
I am fitting models to the responses to a questionnaire that has seven yes/no questions (Item). For each combination of Subject and Item, the variable Response is coded as 0 or 1. I want to include random effects for both Subject and Item. While I understand that the datasets are fairly small, and there are a lot of invariant subjects, I do not understand something that is happening
2007 May 24
3
Problem with numerical integration and optimization with BFGS
Hi R users, I have a couple of questions about some problems that I am facing with regard to numerical integration and optimization of likelihood functions. Let me provide a little background information: I am trying to do maximum likelihood estimation of an econometric model that I have developed recently. I estimate the parameters of the model using the monthly US unemployment rate series
2009 May 19
4
nlrwr package. Error when fitting the optimal Box-Cox transformation with two variables
Dear all: I'm trying to fit the optimal Box-Cox transformation related to nls (see the code below) for the demand of money data in Green (3th Edition) but in the last step R gives the next error message. Error en `[.data.frame`(eval(object$data), , as.character(formula(object)[[2]])[2]) : undefined columns selected. ?Any idea to solve the problem? Thanks in advance,
2008 Sep 09
1
creating table of averages
Dear Colleagues, I have a dataframe with variables: [1] "ID" "category" "a11" "a12" "a13" "a21" [7] "a22" "a23" "a31" "a32" "b11" "b12" [13] "b13" "b21"
2011 Jul 20
3
Grouping columns
*Hi @ all, I have a question concerning the possibilty of grouping the columns of a matrix. R groups the columns alphabetically. What can I do to group the columns in my specifications? The script is the following:* > #R-Skript: Anzahl xyz > > #Quelldatei einlesen > b<-read.csv2("Z:/int/xyz.csv", header=TRUE) > > #Teilmengen f?r die Einzeljahre generieren >
2009 Mar 03
1
R - need more memory, or rejection sampling algorithm doesn't work?
Hi all, I am trying to run rejection sampling for the quantity z11 in the function below. Unfortunately I can't simplify the function further so that z11 only appears once. Whenever I run the algorithm, R looks as if it is running it (no error messages or anything), but then nothing happens for minutes...how long should it take to run something like this in R? I have tried in in both linux
2007 Aug 16
2
Newbie
Hello, I'm a bit new to the world of R so forgive my ignorance. I'm trying to do a zero-inflated negative binomial regression and have received an error message and i'm not sure what it means. I'm running R 2.5.1 on XP. I have just tried a really simple version of the model to see if it would run before I put all the variables in. I have attached all the variables to the
2009 Jul 30
4
edit.row.names taking row names from the edited dataframe
Hi all, I am struggling to work out how to use the rownames from an edited dataframe rather than the row names from the original dataframe. In my data set i'm trying to extract several rows of data on particular individuals, i don't doubt i'm using the long way round but what i have in the way of a script is this: ##selecting the IDs from the dataframe individually
2010 Feb 04
1
Bug in as.character? (PR#14206)
A long formula which is converted using as.character, looses its last part: ``diagonal = 1e-12)'' Shorter formula is ok though. Best, H??vard ************ Browse[2]> formula.str y ~ -1 + b1 + b2 + b3 + b4 + b5 + b6 + b7 + b8 + b9 + b10 + b11 + b12 + b13 + b14 + b15 + b16 + b17 + b18 + b19 + b20 + b21 + b22 + b23 + b24 + b25 + b26 + b27 + b28 + b29 + b30 + b31 + b32 +
2008 Feb 13
2
Newbie HLM with lme4 questions
Dear R listers, I know I'm breaking the rules by asking a "homework" related question-- I hope you'll forgive me. I am a social psychology graduate student, and the only one in my department who uses R. I successfully completed my multiple regression and structural equation modeling courses using R (John Fox's car and sem packages were a big help, as was his book).
2011 Dec 06
1
Sequential Sum in R
I am trying to code the following excel formula in R. a b c Result Formula 1 10 0.1 #N/A IF(B2<20,NA(),C2+IF(ISERROR(D1),0,D1)) 2 20 0.2 0.2 IF(B3<20,NA(),C3+IF(ISERROR(D2),0,D2)) 3 30 0.3 0.5 IF(B4<20,NA(),C4+IF(ISERROR(D3),0,D3)) 4 40
2013 Apr 22
7
Multiple lon lat points in the map with ggplot2
Hello R users, For the last few days I am struggling with the following task: my data.frame: A1 A2 A3 B1 B2 B3 58.81 53.292 54.501 13.013 17.39 19.407 56.02 56.251 54.033 20.099 13.15 10.411 55.376 53.099 57.625 13.396 21.031 13.22 58.584 53.194 54.218 13.038 16.854 19.289 55.7 55.921 53.847 19.942 13.153 9.828 55.093 52.934
2006 Dec 31
0
(no subject)
> > If one compares the random effect estimates, in fact, one sees that > > they are in the correct proportion, with the expected signs. They are > > just approximately eight orders of magnitude too small. Is this a bug? > > BLUPs are essentially shrinkage estimates, where shrinkage is > determined with magnitude of variance. Lower variance more > shrinkage towards
2006 Dec 31
2
zero random effect sizes with binomial lmer [sorry, ignore previous]
I am fitting models to the responses to a questionnaire that has seven yes/no questions (Item). For each combination of Subject and Item, the variable Response is coded as 0 or 1. I want to include random effects for both Subject and Item. While I understand that the datasets are fairly small, and there are a lot of invariant subjects, I do not understand something that is happening here, and in