Displaying 20 results from an estimated 100 matches similar to: "function problem"
2009 Jul 31
2
another automation question
This code works:
x<-letters[1:6]
ycols<-23:28
xcols<-rep(c(3,4,5,8),each=length(ycols))
somertime<-function(i,j)somers2(Pred_pres_a_indpdt[,i,,], population[,j])
results<-mapply(somertime,xcols,ycols)
How can I make variable "h" work?
x<-letters[1:6]
ycols<-23:28
xcols<-rep(c(3,4,5,8),each=length(ycols))
2009 Jul 31
1
automation question
I have columns in two tables that need to be compared in order to get a
statistic. The function calculating the statistic is somers2. Here are the
two columns I must calculate, row by row.
name1 name2
1 Pred_pres_a_indpdt[,3,,] population[,23]
2 Pred_pres_b_indpdt[,3,,] population[,24]
3 Pred_pres_c_indpdt[,3,,] population[,25]
4 Pred_pres_d_indpdt[,3,,]
2009 Jul 30
3
for loop for file names
I am trying to load binary files in the following fashion
load("pred/Pred_pres_a_indpdt")
load("pred/Pred_pres_b_indpdt")
load("pred/Pred_pres_c_indpdt")
load("pred/Pred_pres_d_indpdt")
load("pred/Pred_pres_e_indpdt")
load("pred/Pred_pres_f_indpdt")
but I would like to set up a for loop to replace the letters a:f
Here is what I have so
2006 Jan 04
1
silly, extracting the value of "C" from the results of somers2
Sorry I have a very simple question:
I used somers2 function from Design package:
> z<- somers2(x,y, weights=w)
results are:
>z
C Dxy n Missing
0.88 0.76 500 0.00
Now I want to call only the value of C to be used in further analyses, but I
fail to do it. I have tried:
> z$C
NULL
> z[,C]
Error in z[,C]: incorrect number of dimensions
and some other silly
2004 Aug 30
1
While installing Hmisc...
Dear R-Gurus:
This afternoon I was installing the "Hmisc" package.
I use R in Linux (Fedora Core 1 (yarrow)) on a Compaq presario with 128 MB RAM laptop.
Opening an R session as a root user (superuser), I issued
install.packages("Hmisc")
and waited.
R downloaded the package, installation was going on, and on the standard output I could see that a list of
2007 Mar 28
1
weight factor in somers2 function
Hi!
I?m trying to calculate de C index (concordance probability) through the
somers2 function (library Hmisc). I?m interesting on including the
sampling effort as a weight factor for the evaluation of model predictions
with real data. I?ve some questions about that: first of all I?m not
really sure if I can include sampling effort as a weight factor. Since the
weight factor should be a numeric
2008 Mar 26
2
pseudo R square and/or C statistic in R logistic regression
Dear all,
I am now doing the logistic regression using R. (glm, family=binomial). Besides the standardize summary statistics generated from R, I am also interested in some more informations concerning the model fitting / prediction etc; Particularly I am interested in "pseudo R squar" and "C statistic". I searched the R- help and could only get very limited information. (Post
2006 Apr 18
6
lambda, uncertainty coefficient (& Somers D)
Dear colleagues in R,
Has anybody implemented the
1) (Goodman & Kruskal) lambda
or the
2) (Thiel's) uncertainty coefficient
statistics (in the asymmetric and symmetric forms), or is anyone aware
that they might reside in some package? A search in the R archives
does indicate that they are (somehow) part of the CoCo package, but I
would rather not start learning how to transform my
2007 Feb 19
1
random effect nested within fixed effects (binomial lmer)
I have a large dataset where each Subject answered seven similar
Items, which are binary yes/no questions. So I've always used Subject
and Item random effects in my models, fit with lmer(), e.g.:
model<-lmer(Response~Race+Gender+...+(1|Subject_ID)+(1|
Item_ID),data,binomial)
But I recently realized something. Most of the variables that I've
tested as fixed effects are properties
2004 Jun 04
1
use of "rcorr.cens" with binary response?
Dear R-helpers,
I recently switched from SAS to R, in order to model the occurrence of
rare events through logistic regression.
Is there a package available in R to calculate the Goodman-Kruskal
Gamma?
After searching a bit I found a function "rcorr.cens" which should do
the job, but it is not clear to me how to define the input vectors? Is
"x" a vector with the fitted
2005 Nov 25
3
obtaining a ROC curve
Hello,
I have a classification tree. I want to obtain a ROC curve for this test. What is the easiest way to obtain one?
-Anjali
---------------------------------
[[alternative HTML version deleted]]
2008 Mar 06
2
calculate AUC and plot ROC in R
Hi, there:
Could someone tell me a simple function of plot ROC curve and calculate
AUC in R? My setting is very simple, a column of the true binary
response and another column of predicted probabilities.
Thanks!
Yulei
[[alternative HTML version deleted]]
2006 Feb 27
1
clustering
Hi there,
Sorry for the double email. Does R have the packages for the following
clustering methods? And if it does, what the commands for them?
1. SOM (Self-organization map)
2. Graph partitioning:
3. Neural network
4. Probability Binning
Thank you very much!
Linda
[[alternative HTML version deleted]]
2011 Jun 13
1
Somers Dyx
Hello R Community,
I'm continuing to work through logistic regression (thanks for all the help on score test) and have come up against a new opposition.
I'm trying to compute Somers Dyx as some suggest this is the preferred method to Somers Dxy (Demaris, 1992). I have searchered the [R] archieves to no avail for a function or code to compute Dyx (not Dxy). The overview of Hmisc has
2004 Mar 11
5
Receiver Operator Characteristic curve
Dear R-helpers:
I want to calculate area under a Receiver Operator Characteristic curve. Where can I find related functions?
Thank you in advance
Xiao
2010 Oct 06
2
A problem --thank you
dear:teacher
i have a problem which about the polr()(package "MASS"), if the response must have 3 or more levels?
and how to fit the polr() to 2 levels?
thank you.
turly yours
[[alternative HTML version deleted]]
2002 Aug 04
5
Pseudo R^2 for logit - really naive question
I am using GLM to calculate logit models based on cross-sectional data. I
am now down to the hard work of making the results intelligible to very
average readers. Is there any way to calculate a psuedo analoque to the R^2
in standard linear regression for use as a purely descriptive statistic of
goodness of fit? Most of the readers of my report will be vaguely familiar
and more comfortable with
2007 Dec 31
2
help on ROC analysis
Dear all,
Some functions like 'ROC(Epi)' can be used to perform ROC analyssi, but it
needs us to specify the fitting model in the argument. Now i have got the
predicted p-values (0,1) for the 0/1 response variable using some other
approach, see the following example dataset:
id mark predict.pvalue
1 1 0.927
2 0 0.928
3 1 0.928
..................
2009 Jul 17
2
Getting the C-index for a dataset that was not used to generate the logistic model
Does anyone know how to get the C-index from a logistic model - not using
the dataset that was used to train the model, but instead using a fresh
dataset on the same model?
I have a dataset of 400 points that I've split into two halves, one for
training the logistic model, and the other for evaluating it. The structure
is as follows:
column headers are "got a loan" (dichotomous),
2005 Aug 02
5
question on graphs and finding area under a curve
Question on graphs:
The default case for drawing a graph in R, is where a little space is left
on the x and y axis before the first tick i.e. even if I say xlim=c(0,1) --
there will be some space between the edge of the x-axis and where 0 is
placed. If I want 0 on the edge, how do I do it in R?
Area under the curve:
I have a 45 degree line and a curve above or below it. Is there a way in R