similar to: summated scale

Displaying 20 results from an estimated 10000 matches similar to: "summated scale"

2009 Aug 20
1
how to compute this summation...
Dear R users, I try to compute this summation, http://www.nabble.com/file/p25054272/dd.jpg where f(y|x) = Negative Binomial(y, mu=exp(x' beta), size=1/alp) http://www.nabble.com/file/p25054272/aa.jpg http://www.nabble.com/file/p25054272/cc.jpg In fact, I tried to use "do.call" function to compute each u(y,x) before the summation, but I got an error, "Error in X[i, ]
2012 Oct 26
3
summation sign
Hi all, I have a very quick question on how to use the summation sign in R for the function. Here?s a basic example: the function is sum(i=1 to 5)log(1-xi^2) Id be grateful if someone knows how to do this without writing it out 5 times - I am looking sth along the lines of the following: computeR <- function(x) { return (-sum(log(1-x^2)) }^ thank you vm in advance! -- View this
2006 Nov 21
2
using nested ifelse and rowSums to create new variable?
Dear R-help community, If I have a data.frame df as follows: > df x1 x2 x3 x4 x5 x6 1 5 5 1 1 2 1 2 5 5 5 5 1 5 3 1 5 5 5 5 5 4 5 5 1 4 5 5 5 5 1 5 2 4 1 6 5 1 5 4 5 1 7 5 1 5 4 4 5 8 5 1 1 1 1 5 9 1 5 1 1 2 5 10 5 1 5 4 5 5 11 1 5 5 2 1 1 12 5 5 5 4 4 1 13 1 5 1 4 4 1 14 1 1 5 4 5 5 15 1 5 5 4
2012 May 18
3
LM with summation function
Hi all, I'm trying to model some data where the y is defined by y = summation[1 to 50] B1 * x + B2 * x^2 + B3 * x^3 Hopefully that reads clearly for email. Anyway, if it wasn't for the summation, I know I would do it like this lm(y ~ x + x2 + x3) Where x2 and x3 are x^2 and x^3. However, since each value of x is related to the previous values of x, I don't know how to do this.
2008 Nov 15
1
make a triple summation more efficient
Dear R users... I made the R-code for this triple summation computation http://www.nabble.com/file/p20517134/a.jpg ------------------------------------------------- Here is my code.. x=seq(.1,1,.1); l=10 y=seq(1,10); m=10 z=seq(.1,1,.1); n=10 sum(sapply(1:l, function(i) {sum(sapply(1:m, function(j) {sum(sapply(1:n, function(k){exp(x[i]*y[j]*z[k] )/gamma(y[j]+1)}))^(1.5) }))}))
2012 Aug 01
2
sub setting a data frame with binomial responses
Hi everyone, Let me have a dataframe named ?mydata? and created as below, *> n=c(5,5,5,5) #number of trils > x1=c(2,3,1,3) ) #number of successes > x2=c(5,5,5,5) #number of successes > x3=c(0,0,0,0) #number of successes > x4=c(5,0,5,0) #number of successes > mydata=data.frame(n,x1,x2,x3,x4) > mydata* n x1 x2 x3 x4 1 5 2 5 0 5 2 5 3 5 0 0 3 5 1 5 0 5 4 5 3 5 0
2003 Aug 26
2
Simple simulation in R
Hello all I have a feeling this is very simple......but I am not sure how to do it My boss has two variables, one is an average of 4 numbers, the other is an average of 3 of those numbers i.e var1 = (X1 + X2 + X3 + X4)/4 var2 = (X1 + X2 + X3)/3 all of the X variables are supposed to be measuring similar constructs not surprisingly, these are highly correlated (r = .98), the question is how
2010 Aug 13
2
Fw: Error in rowSums REPOST
For the query below I have also included the follwing information. Thanks for your replies > str(FeaturePresenceMatrix) chr [1:65530, 1:40] "0" "0" "0" "0" "1" "0" "0" "0" "0" ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:65530] "4" "5" "6" "7" ...
2008 Mar 31
1
APPLY as alternate to FOR loop?
Dear list, Below I've written a clunky for loop that counts NA's in a row, replacing all with NA if there are more than 3 missing values, or keeping the values if 4 or more are present. This is sample code from a very large dataframe I'm trying to clean up. I know there are many simpler more elegant solutions to this little problem. Would someone be willing to show me how to
2012 Nov 22
4
Data Extraction
Hello, I would appreciate if someone could help me resolve the following: 1. df1[!is.na( X1 | X2 | X3 | X4 | X5),][,1:5] # This does not work 2. Is these message harmful? The following object(s) are masked from 'df1 (position 3)': X1, X2, X3, X4, X5 Thanks, Pradip Muhuri #Reproducible Example set.seed(5) df1<-data.frame(matrix(sample(c(1:10,NA),100,replace=TRUE),ncol=5))
2010 Oct 01
2
How to apply vector value function to a multidimensional array indexed by the remaining dimensions?
Hi, I am looking for some generalization of colSums and rowSums for general vector valued functions, and for arrays of more than 2 dimensions. So as a concrete example, suppose I have a 3 dimensional array, given by x = array(1:100,c(3,4,5)). and I want to sum the 3rd index of x to obain a 3 by 4 matrix. Using rowSums would return a vector of length 3 because it treats the last two indices as
2003 Dec 30
1
Accuracy: Correct sums in rowSums(), colSums() (PR#6196)
Full_Name: Nick Efthymiou Version: R1.5.0 and above OS: Red Hat Linux Submission from: (NULL) (162.93.14.73) With the introduction of the functions rowSums(), colSums(), rowMeans() and colMeans() in R1.5.0, function "SEXP do_colsum(SEXP call, SEXP op, SEXP args, SEXP rho)" was added to perform the fast summations. We have an excellent opportunity to improve the accuracy by
2007 Jan 30
2
R and S-Plus got the different results of principal component analysis from SAS, why?
Dear Rusers, I have met a difficult problem on explaining the differences of principal component analysis(PCA) between R,S-PLUS and SAS/STATA/SPSS, which wasn't met before. Althought they have got the same eigenvalues, their coeffiecients were different. First, I list my results from R,S-PLUS and SAS/STATA/SPSS, and then show the original dataset, hoping sb. to try and explain it.
2004 Jul 19
10
How to compare X1 = X2 = ... = Xn?
Dear All, I have a data frame with n columns: X1, X2, ., Xn. Now I want to create a new column: if X1 = X2 = . = Xn, the value is 1; Otherwise, the value is 0. How to do that in a quick way instead of doing (n choose 2) comparisons? Thank you, Frank [[alternative HTML version deleted]]
2009 Jan 20
2
Summing Select Columns of a Data Frame?
Hi, I would like to operate on certain columns in a dataframe, but not others. My data looks like this: x1 x2 x3 1 2 3 4 5 6 7 8 9 I want to create a new column named x4 that is the sum of x1 and x2, but NOT x3. I looked at colSums and apply, but those functions seem to use all the columns in a dataframe. How do I only use select columns? If it helps, in Stata this would be gen x4
2007 Feb 19
1
Need to find most likely betas
Hello, I have a particular situation where a single "wrong" observation is impacting the results of a traditional regression to the point that betas become unreliable. I need a way to calculate the most likely betas. Here's an example: set.seed(1) unknownbeta <- matrix(seq(100,500,100),25,5,byrow=TRUE) x <-matrix(runif(25*5),25) y <- rowSums(unknownbeta*x)
2018 Feb 12
3
RStudio, Spss, SAS, Stata, txt
Estimados Hoy instale RStudio, y por sorpresa o desconocimiento de mi parte, veo que hay la posibilidad de importar datos excel, spss, sas, stata, texto, recuerdo consultas en la lista al respecto, posiblemente mucho se soluciones con las herramientas propuestas por RStudio. Javier Rubén Marcuzzi [[alternative HTML version deleted]]
2010 Oct 12
1
delta AIC for models with 2 variables using MuMIn
Dear List, I want to ask a AIC question based on package library(MuMIn) The relative importance of 16 explanatory variables are assessed using delta AIC in a generalized linear model. Please kindly advise if it is possible to show models with any two only certain variables. Thank you. Elaine I asked a similar question and got a great help for models with only one variable as below.
2006 Aug 31
3
what's wrong with my simulation programs on logistic regression
Dear friends, I'm doing a simulation on logistic regression model, but the programs can't work well,please help me to correct it and give some suggestions. My programs: data<-matrix(rnorm(400),ncol=8) #sample size is 50 data<-data.frame(data) names(data)<-c(paste("x",1:8,sep="")) #8 independent variables,x1-x8; #logistic regression model is
2005 Feb 07
4
proportional matrix rows
Hi I have a two-column integer matrix like this: R> jj [,1] [,2] [1,] -1 1 [2,] -2 2 [3,] -7 6 [4,] -8 7 [5,] -6 5 [6,] -9 8 [7,] -5 4 [8,] 3 -3 [9,] -10 9 [10,] -4 3 I want a diagnostic that detects whether a row is a multiple of the first row or not. In this case, this would be rows 1,2, and 8. How to do this