similar to: Nagelkerke R square for Prediction data

Displaying 20 results from an estimated 500 matches similar to: "Nagelkerke R square for Prediction data"

2009 Mar 08
1
Summary of data.frame according to colnames and grouping factor
A dataframe holds 3 vars, each checked true or false (1, 0). Another var holds the grouping, r and s: ### start:example set.seed(20) d <- data.frame(sample(c(0, 1), 20, replace=T), sample(c(0, 1), 20, replace=T), sample(c(0, 1), 20, replace=T)) names(d) <- c("A", "B", "C") e <- rep(c("r", "s"), 10) ### end:example How do I get the
2011 Jan 06
4
Different LLRs on multinomial logit models in R and SPSS
Hello, after calculating a multinomial logit regression on my data, I compared the output to an output retrieved with SPSS 18 (Mac). The coefficients appear to be the same, but the logLik (and therefore fit) values differ widely. Why? The regression in R: set.seed(1234) df <- data.frame( "y"=factor(sample(LETTERS[1:3], 143, repl=T, prob=c(4, 1, 10))), "a"=sample(1:5,
2009 Mar 07
2
Recode factor into binary factor-level vars
How to I "recode" a factor into a binary data frame according to the factor levels: ### example:start set.seed(20) l <- sample(rep.int(c("locA", "locB", "locC", "locD"), 100), 10, replace=T) # [1] "locD" "locD" "locD" "locD" "locB" "locA" "locA" "locA"
2010 Nov 17
2
slicing list with matrices
A list contains several matrices. Over all matrices (list elements) I'd like to access one matrix cell: m <- matrix(1:9, nrow=3, dimnames=list(LETTERS[1:3], letters[1:3])) l <- list(m1=m, m2=m*2, m3=m*3) l[[3]] # works l[[3]][1:2, ] # works l[[1:3]][1, 1] # does not work How can I slice all C-c combinations in the list? S?ren -- S?ren Vogel, Dipl.-Psych. (Univ.), PhD-Student, Eawag,
2009 Mar 11
3
chisq.test: decreasing p-value
A Likert scale may have produced counts of answers per category. According to theory I may expect equality over the categories. A statistical test shall reveal the actual equality in my sample. When applying a chi square test with increasing number of repetitions (simulate.p.value) over a fixed sample, the p-value decreases dramatically (looks as if converge to zero). (1) Why? (2) (If
2009 Nov 13
1
shrink list by mathed entries
Hello a <- c("Mama", "Papa", "Papa; Mama", "", "Sammy; Mama; Papa") a <- strsplit(a, "; ") mama <- rep(F, length(a)) mama[sapply(a, function(x) { sum(x=="Mama") }, simplify=T) > 0] <- T papa <- rep(F, length(a)) papa[sapply(a, function(x) { sum(x=="Papa") }, simplify=T) > 0] <- T # ... more
2009 Nov 22
3
Define return values of a function
I have created a function to do something: i <- factor(sample(c("A", "B", "C", NA), 793, rep=T, prob=c(8, 7, 5, 1))) k <- factor(sample(c("X", "Y", "Z", NA), 793, rep=T, prob=c(12, 7, 9, 1))) mytable <- function(x){ xtb <- x btx <- x # do more with x, not relevant here cat("The table has been created,
2009 Nov 13
0
Craddock-Flood Test in R?
Hello The "Craddock-Flood Test" is recommended for large tables with small degrees of freedom and low-frequency cells. Is there an R procedure and/or package which does the test? Thank you for your help! S?ren Vogel -- S?ren Vogel, Dipl.-Psych. (Univ.), PhD-Student, Eawag, Dept. SIAM http://www.eawag.ch, http://sozmod.eawag.ch
2010 Jul 23
0
ROpenOffice (which requires Rcompression)
Hello, for my data preparation and administration (data, labels, etc.) I use OpenOffice.org ODS spreadsheet files with several sheets in one file. However, I find it inconvenient to export every single sheet to a csv file whenever I apply changes to the labelling or so, and I haven't found a plugin or an application which does this batch in OOorg. Is there new development on a direct import
2010 Dec 03
1
Linear separation
In https://stat.ethz.ch/pipermail/r-help/2008-March/156868.html I found what linear separability means. But what can I do if I find such a situation in my data? Field (2005) suggest to reduce the number of predictors or increase the number of cases. But I am not sure whether I can, as an alternative, take the findings from my analysis and report them. And if so, how can I find the linear
2011 Apr 12
0
cross-validation complex model AUC Nagelkerke R squared code
Hi there, I really tried hard to understand and find my own solution, but now I think I have to ask for your help. I already developed some script code for my problem but I doubt that it is correct. I have the following problem: Image you develop a logistic regression model with a binary outcome Y (0/1) with possible preditors (X1,X2,X3......). The development of the final model would be
2012 Mar 05
1
Nagelkerke R2
Dear R community. I´m working with a generalized linear model which the response variable is a categorical one and the predictive variables are weather conditions. I have 250 different places where I need to fit the model. In some of these places I have strong correlations between some of the variables so I need to deal with this problem. I found a work similar than mine where they use tha
2011 Apr 11
1
pseudo-R by hand
hello dear list! since we want to do a model analysis and some people would like to see pseudo-R^2 values for different types of glm of a logistic regression, i've decided to write a function that computes either nagelkerkes normed pseudo-R or cox & snells pseudo-R. however, i am not clear as in the decisive step, i need to calculate the log of (maximum likelihood estimates of model
2006 Jun 14
1
Estimate region of highest probabilty density
Estimate region of highest probabilty density Dear R-community I have data consisting of x and y. To each pair (x,y) a z value (weight) is assigned. With kde2d I can estimate the densities on a regular grid and based on this make a contour plot (not considering the z-values). According to an earlier post in the list I adjusted the kde2d to kde2d.weighted (see code below) to estimate the
2009 Jul 15
0
Nagelkerkes R2N
I am interested Andrea is whether you ever established why your R2 was 1. I have had a similar situation previously. My main issue though, which I'd be v grateful for advice on, is why I am obtaining such negative values -0.3 for Somers Dxy using validate.cph from the Design package given my value of Nagelkerke R2 is not so low 13.2%. I have this output when fitting 6 variables all with
2000 Nov 16
2
newbee question
Dear All Where can I lookup good methods to compute p from q=bin(m,n)p^n*(1-p)^(m-n) such that q<=alfa, alfa small. Are there such libs, code and source in R? Best Regards -- Jan Burse SIAM, EAWAG Scheuchzerstr. 67 ?berlandstr. 133 8006 Z?rich 8600 D?bendorf tel: +41-1-364 17 66 tel: +41-1-823 55 34
2008 Jun 25
1
help_transformation
heya, i am fitting linear mixed effect model to a response Y. Y shows an s-shaped distribution when using QQ-plots (some zero values and some very high values). hence, which transformation should i apply that Y follows a normal distribution? any r-function/package available to do this? thanks for any hint, regards, lukas ??? Lukas Indermaur, PhD student eawag / Swiss Federal Institute of
2007 Feb 20
1
testing slopes
Hello Instead of testing against 0 i would like to test regression slopes against -1. Any idea if there's an R script (package?) available. Thanks for any hint. Cheers Lukas ??? Lukas Indermaur, PhD student eawag / Swiss Federal Institute of Aquatic Science and Technology ECO - Department of Aquatic Ecology ?berlandstrasse 133 CH-8600 D?bendorf Switzerland Phone: +41 (0) 71 220
2007 Jan 11
0
Re: Digium TE407P vs. Sangoma A104d
Hi, Recommending to go Digium because of an OpenBSD issue with the Sangoma A104D is quite funny to say the least since neither is the TE407P supported in BSD by Digium. So the recommendation is useless to the person who originally requested for a comparison between the two products. If someone wanted to send back the A104D, he could have taken advantage of Sangoma's 30 day money back
2007 Feb 28
1
bootstrap
Hi, I would like to evaluate the frequency of the variables within the best selected model by AIC among a set of 12 competing models (I fit them with GLM) with a bootstrap procedure to get unbiased results. So I would ike to do the ranking of the 12-model-set 10'000 times separately and calculate the frequency of variables of the 10'000 best ranked models. I wrote a script doing the model