similar to: Predict Function

Displaying 7 results from an estimated 7 matches similar to: "Predict Function"

2010 Feb 18
1
logistic regression - what is being predicted when using predict - probabilities or odds?
Dear gurus, I've analyzed a (fake) data set ("data") using logistic regression (glm): logreg1 <- glm(z ~ x1 + x2 + y, data=data, family=binomial("logit"), na.action=na.pass) Then, I created a data frame with 2 fixed levels (0 and 1) for each predictor: attach(data) x1<-c(0,1) x2<-c(0,1) y<-c(0,1) newdata1<-data.frame(expand.grid(x1,x2,y))
2013 May 21
1
keep the centre fixed in K-means clustering
Dear R users I have the matrix of the centres of some clusters, e.g. 20 clusters each with 100 dimentions, so this matrix contains 20 rows * 100 columns numeric values. I have collected new data (each with 100 numeric values) and would like to keep the above 20 centres fixed/'unmoved' whilst just see how my new data fit in this grouping system, e.g. if the data is close to cluster 1
2013 Apr 03
1
linear model coefficients by year and industry, fitted values, residuals, panel data
Hi R-helpers, My real data is a panel (unbalanced and with gaps in years) of thousands of firms, by year and industry, and with financial information (variables X, Y, Z, for example), the number of firms by year and industry is not always equal, the number of years by industry is not always equal. #reproducible example firm1<-sort(rep(1:10,5),decreasing=F) year1<-rep(2000:2004,10)
2008 Jun 15
2
How to take the average of multiple rows
Dear all, I have a matrix, called newdata1, > dim(newdata1) [1] 34176 83 It looks like: EntrezID Name S1 S2 S3 S4 S5..... 1 4076 CAPRIN1 0.1 0.2 0.3... 2 139170 WDR40B 0.4 0.5 0.6... 3 5505 PPP1R2P1 0.3 0.3 0.7... 4 4076 CAPRIN1 0.7 0.3 0.2... 5 139170 WDR40B null 0.8
2012 Dec 12
2
help with predict.glm, and charting with factors
Dear R Wizards, After much frustration and days of confusion I have finally broken down and am asking for help, which I don’t like doing, but I just can’t figure this one out on my own. I’ve conducted a laboratory experiment testing the effects of temperature and salinity on whether or not a biological event will occur (Go or NoGo). I’ve coded the factors temperature and salinity as factors for
2011 Sep 27
0
Keep consecutive year observations (remove gap's) in panel data (dataframes). Difficulties in using lag(). Package plm.
Hi everyone. I have two questions. I’ve found some other questions and answers similar to these but they didn’t solve my problem. I’m working with a panel of firm/years observations (see my reproducible example). I’m using the plm package. My panel not only is unbalanced but also have some gap’s in years. #reproducible example
2008 Jun 14
1
how to select out some columns using cbind()
Hello! I have a matrix: > dim(data1) [1] 34176 581 of 34176 rows and 581 columns, I want to make a new matrix data2 by taking the 2nd column, 9th column, 16th column.... the column number is in the order of: 2 9 (2+7) 16 (9+7) 23 (16+7) ... the new matrix data2 should include 83 columns, is there an easy way to do that using cbind() function? Thanks a lot! Allen [[alternative HTML