Re: [R] pairwise deletion in regression models

2016-07-13 Thread Adel Daoud
deletion in the cor() function, but I need it for regression analysis. The default is listwise (casewise) deletion. Would be grateful for further input on this. Best, Adel -- Adel Daoud, PhD, Researcher *Newly published:* * Daoud, Adel and Kohl, Sebastian, *How Much Do Sociologists Write

Re: [R] pairwise deletion in regression models

2016-07-13 Thread Adel Daoud
. Best, Adel -- Adel Daoud, PhD, Researcher *Newly published:* * Daoud, Adel and Kohl, Sebastian, *How Much Do Sociologists Write About Economic Topics? Using Big-Data to Test Some Conventional Views in Economic Sociology, 1890 to 2014*. Max Planck Institute for the Study of Societies, Discussion

[R] pairwise deletion in regression models

2016-07-12 Thread adel daoud
td4653004.html>, but without any clear answer. Any input is welcomed Thanks in advance Adel [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/lis

Re: [R] Alpha not working in geom_rect

2015-03-10 Thread adel daoud
Thanks for the info Jeff. I will stick to using annotate() -- Adel Daoud, PhD, Researcher The New School for Social Research, Visiting Scholar in the Economics Department, 6 East 16th Street New York, NY 10003, dao...@newschool.edu University of Gothenburg Department of Sociology

Re: [R] Alpha not working in geom_rect

2015-03-09 Thread adel daoud
ax=1, fill="black", alpha=0.5) Best Adel -- Adel Daoud, PhD, Researcher The New School for Social Research, Visiting Scholar in the Economics Department, 6 East 16th Street New York, NY 10003, dao...@newschool.edu University of Gothenburg Department of Sociology and Work Sc

[R] Alpha not working in geom_rect

2015-03-07 Thread Adel
Hi I am trying to activate the alpha argument to work, but for some reason it does not to play with me. Anybody has an idea why? p <- ggplot(data = prediction_df, aes(x=x, y=prediction, fill=threshold)) + geom_area(colour="black", size=.2, alpha=.4) + scale_fill_brewer(palette="Set1", breaks=rev

[R] Using gregexpr and regmatches but getting Iconv error

2014-12-11 Thread Adel
p them in that list format. > authors.raw <- unlist(regmatches(authors.raw, r)) > authors.raw [1] " [\"Allan G. KING\"" ", \"B. Lindsay LOWELL\"" ", \"Frank D. BEAN\"" " \"Chris Baldry\"" (4)

Re: [R] list.files accessing subdirectory as relative path?

2014-05-06 Thread Adel
Thanks for the reply Don and Frede, Your suggestions works perfectly! Best Adel -- View this message in context: http://r.789695.n4.nabble.com/list-files-accessing-subdirectory-as-relative-path-tp4689997p4690048.html Sent from the R help mailing list archive at Nabble.com

[R] list.files accessing subdirectory as relative path?

2014-05-05 Thread Adel
to look into the specified subdirectory. I have tried several combination and searched the list but without any great success. Actually: list.files(path = "../...") #goes up one level in the folder structure so I cannot see what the problem is. Thanks in advance. Adel -- View this

Re: [R] barchar or barp on multiple data

2014-01-15 Thread Adel ESSAFI
here is the solution if anyone is interrested barchart(V5 ~ V3 | V1 * V2 , data = t,groups = V4, layout = c(1,6), auto.key = list(space = "right"), ylab = "Makespan") Regards 2014/1/14 Adel ESSAFI > Hello list > I have the following data in file in attachment.

Re: [R] barchar or barp on multiple data

2014-01-14 Thread Adel ESSAFI
3.9, 115.9, 170.28, 107.82, 175.61, 4.65, 8.27, 4.22, 7.77, 0.04, 0.04, 1.8, 1.42, 4.7, 8.27, 4.22, 7.74, 0.57, 0.68, 57.81, 47.98, 115.58, 163.48, 108.85, 172.21)), row.names = c(NA, -80L ), .Names = c("V1", "V2", "V3", "V4", "V5", "V6", &q

[R] barchar or barp on multiple data

2014-01-14 Thread Adel ESSAFI
Hello list I have the following data in file in attachment. in want to draw bars for every value of V5 in finction of V3 grouped by V2*V1. however, each unique value of V4, V2 and V1 I want to draw a bar. This example is very close to want I want to do. but here, for each value of V3, barchart dra

[R] embedd fonts in pdf generated by R

2014-01-10 Thread Adel ESSAFI
Hello list I generated pdf files with R that I integrated in .tex file and compiled with pdflatex. however, all the fonts of my R figure not embadded. so the file is rejected from EDAS web site. Could you help please. [adel@localhost hcw]$ pdffonts hcw.pdf name

[R] Fwd: barchar and box on the same figure! is it possible

2014-01-10 Thread Adel ESSAFI
Hello list I have this data frame which represent values grouped by algorithm. remark that for each algorithm, we have the same value in V3 but differnt values in V4. I want to make a plot with algorithms in axes, and for each algorithm I draw a bar (for V3) and a bwplot for V4. is thart possible.

[R] barchar and box on the same figure! is it possible

2014-01-10 Thread Adel ESSAFI
Hello list I have this data frame which represent values grouped by algorithm. remark that for each algorithm, we have the same value in V3 but differnt values in V4. I want to make a plot with algorithms in axes, and for each algorithm I draw a bar (for V3) and a bwplot for V4. is thart possible.

Re: [R] ifelse statement with two vectors of different length

2013-12-18 Thread Adel
ran", "Iran", "Norway","Uruguay", "Zimbabwe") ) I had to use the gsub to fix this first. Interestingly, the setdiff() function did not react on spacing difference which I used before coming to the ifelse statement and therefore I did not react on t

[R] ifelse statement with two vectors of different length

2013-12-18 Thread Adel
names that appear in long_df$country_name is around 200. Any suggestions? Thanks in advance. Best Adel -- View this message in context: http://r.789695.n4.nabble.com/ifelse-statement-with-two-vectors-of-different-length-tp4682401.html Sent from the R help mailing list archive at Nabb

[R] multiple bar for barchart

2013-12-09 Thread Adel ESSAFI
Hello list, I have the following data on "dm" table > dm Group.1 V1 V2 V3V4 V5 V6 V7 V8 1 C/L NA 15.5 732179 875270.6 -143091.46 1107270 1088300 18964.40 2 C/S NA 15.5 803926 850352.1 -46426.03 1395710 1312310 83403.30 3 D/D NA 15

Re: [R] the wilcox.test() and pairwise.wilcox.test are producing different results

2013-12-01 Thread Adel
Thanks Arun! It was simple as that. You suggestion solved it. Best Adel -- View this message in context: http://r.789695.n4.nabble.com/the-wilcox-test-and-pairwise-wilcox-test-are-producing-different-results-tp4681375p4681423.html Sent from the R help mailing list archive at Nabble.com

[R] the wilcox.test() and pairwise.wilcox.test are producing different results

2013-11-29 Thread Adel
lity, airquality$Month < 7) #p-value is now 0.1925 wilcox.test(air$Ozone~air$Month) What am I doing wrong here? Best Adel -- Adel Daoud, PhD Visiting researcher (post-doc) Max Planck Institute for the Study of Societies / Max-Planck-Institut für Gesellschaftsforschung Paulstr. 3 | 5

[R] legend for bar plot ?

2013-11-26 Thread Adel ESSAFI
Hello; I have the following table > m V2 V1 V3 1 C/L 0 732179 3 C/S 0 803926 19 D/F 0 724924 17 D/I 0 755841 13 D/L 0 731904 15 D/S 0 798289 11 I/F 0 871670 9 I/I 0 897718 5 I/L 0 2628113 7 I/S 0 2628113 2 C/L 1 1107269 4 C/S 1 1395714 20 D/F 1 1181282 18 D/I 1

[R] legend for bar plot ?

2013-11-26 Thread Adel ESSAFI
Hello; I have the following table > m V2 V1 V3 1 C/L 0 732179 3 C/S 0 803926 19 D/F 0 724924 17 D/I 0 755841 13 D/L 0 731904 15 D/S 0 798289 11 I/F 0 871670 9 I/I 0 897718 5 I/L 0 2628113 7 I/S 0 2628113 2 C/L 1 1107269 4 C/S 1 1395714 20 D/F 1 1181282 18 D/I 1

Re: [R] scatter plot matrix with different x-y variables

2013-05-13 Thread adel daoud
programming so please just direct me into the right direction. John, the grid.arrange() function is useful too but not exactly what I needed. Thanks any way. Best Adel On Sat, May 11, 2013 at 4:52 PM, Greg Snow <538...@gmail.com> wrote: > The pairs2 function in the TeachingDemos pac

Re: [R] R prints empty group on my figure!!

2013-05-10 Thread Adel ESSAFI
2013/5/9 PIKAL Petr > Hi > Thank you, that was the option I look for > > Use drop=TRUE argument in interaction for removing unused levels. > > Petr > > > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- >

[R] scatter plot matrix with different x-y variables

2013-05-08 Thread Adel
variables on each axis. Secondly, to add to this, can I add a correlation line (linear and quadratic) through all scatter plots with both correlation and R2 values? All help appreciated. Adel -- Adel Daoud, PhD Department of Sociology, University of Gothenburg Box 720 405 30 Göteborg, SWEDEN

Re: [R] R prints empty group on my figure!!

2013-05-08 Thread Adel ESSAFI
hello, I attach the figure generated by R: 2013/5/8 Adel ESSAFI > Hello list > I am trying to solve a problem when drawing a figure related to the > dataframe below. > I draw V6 in Y axes and V3 as X axes. The data are grouped by V1 AND V2. > I use this commande to make it: &

[R] R prints empty group on my figure!!

2013-05-08 Thread Adel ESSAFI
Hello list I am trying to solve a problem when drawing a figure related to the dataframe below. I draw V6 in Y axes and V3 as X axes. The data are grouped by V1 AND V2. I use this commande to make it: xyplot(cm[,6]~cm[,3],type="b",group=interaction(cm[,1],cm[,2],sep="/"), auto.key =list( title="Ma

Re: [R] xyplot legend : simple question

2013-05-06 Thread Adel ESSAFI
Thank you maybe the argument sep of interaction() helps you. Try > > interaction( g[,1], g[,2], sep = "/") > > Regards -- Gerrit > > > > I am using this command to draw the figure attached to this mail. >> >> xyplot(g[,4]~g[,3],type="b",**group=interaction(g[,1],g[,2])**, auto.key >> =list( tit

Re: [R] xyplot legend : simple question

2013-05-06 Thread Adel ESSAFI
thank you 2013/5/6 Gerrit Eichner > Hello, Adel, > > maybe the argument sep of interaction() helps you. Try > > interaction( g[,1], g[,2], sep = "/") > > Regards -- Gerrit > > > > I am using this command to draw the figure attached to this mail

[R] ggplot and colors

2013-02-04 Thread Adel ESSAFI
Hello, I have a problem with ggplot and colors I used this function to draw somes lines and I want them to be all black (just to test) however, I dont get any black line in the figure. Do you have any experience with ggplot and manual colors?? ggplot(cmax, aes(cmax[,3], cmax[,6],colour=interac

[R] monte carlo simulation on R

2012-12-04 Thread Adel ESSAFI
Hello, How can I make a monte carlo simulation on R? Regards Adel -- PhD candidate in Computer Science Address 3 avenue lamine, cité ezzahra, Sousse 4000 Tunisia tel: +216 97 246 706 (+33640302046 jusqu'au 15/6) fax: +216 71 391 166 [[alternative HTML version de

[R] mean and kurtosis

2012-11-09 Thread Adel Powell
Need help! I know how to get the mean and kurtosis for a single variable but I am reading in an excel file that has several columns representing variables. I need a way to find descriptive statistics across ALL the variables? [[alternative HTML version deleted]] __

[R] Problems getting slope and intercept to change when do multiple reps.

2012-10-26 Thread Adel Powell
library(ROCR) n <- 1000 fitglm <- function(iteration,intercept,sigma,tau,beta){ x <- rnorm(n,0,sigma) ystar <- intercept+beta*x z <- rbinom(n,1,plogis(ystar)) xerr <- x + rnorm(n,0,tau) model<-glm(z ~ xerr, family=binomial(logit)) *int*<-coef(model)[1] *slope*<-coef(model)[2] # when a

Re: [R] How to extract auc, specificity and sensitivity

2012-10-25 Thread Adel Powell
hich(result==z))/length(z)* * * *> accuracy* [1] 0.8 *> rocpreds<-prediction(result,z)* * * *> rocpreds* *> auc<-performance(rocpreds,"auc")@y.values* * * *> auc* [[1]] [1] 0.7916667 * > fp<-performance(rocpreds,"sens")* * * *> sentiv<

Re: [R] How to extract auc, specificity and sensitivity

2012-10-25 Thread Adel Powell
ntivity [1] 1 $Specificity [1] 0 > Don't get error message but wrong values On Thu, Oct 25, 2012 at 4:05 PM, Berend Hasselman wrote: > > > Your code is still not runnable. > It gives the error message > > Error in fitglm(0.05, 1) : could not find function "pre

[R] How to extract auc, specificity and sensitivity

2012-10-25 Thread Adel Powell
I am running my code in a loop and it does not work but when I run it outside the loop I get the values I want. n <- 1000; # Sample size fitglm <- function(sigma,tau){ x <- rnorm(n,0,sigma) intercept <- 0 beta <- 0 ystar <- intercept+beta*x z <- rbinom(n,1,plogis(ystar)) x

[R] Logistic regression/Cut point? predict ??

2012-10-20 Thread Adel Powell
I am new to R and I am trying to do a monte carlo simulation where I generate data and interject error then test various cut points; however, my output was garbage (at x equal zero, I did not get .50) I am basically testing the performance of classifiers. Here is the code: n <- 1000; # Sample size

[R] syntaxe problem

2012-02-24 Thread Adel ESSAFI
Hello, I want to create 10 dataframe using a for loop. I don t know what to do to create 10 different dataframes whose name is parametrized with variable i. This syntaxe fails. It create a unique fataframe called dfn. Any input will help Thanks > for (i in 1:10){ + filename=paste("avail4",i,sep

Re: [R] transforming a data frame to matrix

2012-02-18 Thread Adel ESSAFI
with simpler expressions: if I have a dataframe A B C is it possible de transform it to a matrix where nrow(A) colomns, nrow(B) row and for each value of C, we put the corresponding value in the matrix. Regards Le 18 février 2012 13:57, Adel ESSAFI a écrit : > Hello > > >

[R] transforming a data frame to matrix

2012-02-18 Thread Adel ESSAFI
Hello > orderulcount Group.1 Group.2 Group.3 xV5 7C L 0.0 30 C / L 19 C L 0.2 27 C / L 31 C L 0.4 15 C / L 43 C L 0.6 7 C / L 54 C L 0.8 2 C / L 10 C S 0.0 27 C / S 22 C S 0.

Re: [R] multiple histograms from a dataframe

2012-02-11 Thread Adel ESSAFI
Le 11 février 2012 02:33, David Winsemius a écrit : > > On Feb 10, 2012, at 7:05 PM, Adel ESSAFI wrote: > > Hi list >> >> >> I need some help for drawing some histograms >> >> I have a dataframe , say, >> X Y Z T >> >> I want to draw

[R] multiple histograms from a dataframe

2012-02-10 Thread Adel ESSAFI
ecting distinct values of law[,1] The deal is to make the same thing but for a couple of columns Thanks in advance for help Adel -- PhD candidate in Computer Science Address 3 avenue lamine, cité ezzahra, Sousse 4000 Tunisia tel: +216 97 246 706 (+33640302046 jusqu'au 15/6) fax: +216

[R] generate a random number with rexp ?

2012-01-27 Thread Adel ESSAFI
dear list I use runif to generate a ramdom number between min and max runif(n, min=0, max=1) however , the syntaxe of rexp does not allow that rexp(n, rate = 1) and it generate a number with the corresponding rate. The question is: how to generate a number between min and max using rexp().

Re: [R] generate a number using exponential low

2011-12-13 Thread Adel ESSAFI
Deal list > I want to generate a random number in an interval using exponential low > I know how to make that simply using uniform low > x1 <- runif(1, 5.0, 7.5) > this will generate a number between 5 et 7.5 but with uniform low. > Could you help pease.? > Regards > > -- > PhD candidate in Comput

Re: [R] question about aggregate

2011-10-22 Thread Adel ESSAFI
e data, try this > > aggregate(si[,7],list(si[,2],si[,1]),function(x) sum(table(x))) > > Weidong > > On Sat, Oct 22, 2011 at 9:28 AM, Adel ESSAFI wrote: > > NO > >> aggregate(si[,7],list(si[,2],si[,1]),mean) > >Group.1 Group.2 x > > 1

Re: [R] question about aggregate

2011-10-22 Thread Adel ESSAFI
2011/10/22 Adel ESSAFI > NO > > aggregate(si[,7],list(si[,2],si[,1]),mean) >Group.1 Group.2 x > 1 0.0 D 212.5015448 > 2 0.2 D 200.5271137 > 3 0.4 D 191.5387529 > 4 0.6 D 131.5856218 > 5 0.8 D 16.4

Re: [R] question about aggregate

2011-10-22 Thread Adel ESSAFI
u want? > > sci[,5][sci[,2]==0 & sci[,1]==L] > > Weidong > > On Sat, Oct 22, 2011 at 8:19 AM, Adel ESSAFI wrote: > > Hi, > > It is not what I want, but, thx anyway. > > Regards > > > > > > 2011/10/22 Weidong Gu > >> > >> t

Re: [R] question about aggregate

2011-10-22 Thread Adel ESSAFI
Hi, It is not what I want, but, thx anyway. Regards 2011/10/22 Weidong Gu > try this > > table(sci[,2]=0,sci[,1]=L) > > Weidong Gu > > On Sat, Oct 22, 2011 at 7:51 AM, Adel ESSAFI wrote: > > Hello, > > is there any help please. > > Regards > > &

[R] Fwd: question about aggregate

2011-10-22 Thread Adel ESSAFI
Hello, is there any help please. Regards 2011/10/21 Adel ESSAFI > Hello > I am discovering R and I find it is really very powerful. > > However, I find some newbie difficulties. > > Here, I have a data frame with manu values that I want to calculate the > frequency (the n

Re: [R] question about aggregate

2011-10-22 Thread Adel ESSAFI
Hello, is there any help please. Regards 2011/10/21 Adel ESSAFI > Hello > I am discovering R and I find it is really very powerful. > > However, I find some newbie difficulties. > > Here, I have a data frame with manu values that I want to calculate the > frequency (the n

[R] question about aggregate

2011-10-21 Thread Adel ESSAFI
Hello I am discovering R and I find it is really very powerful. However, I find some newbie difficulties. Here, I have a data frame with manu values that I want to calculate the frequency (the nomber of line) of the some criteria. For exemple here, I want it to print the number of occurence wher

[R] question about aggregate

2011-10-21 Thread Adel ESSAFI
Hi list I am discovering R, and -- PhD candidate in Computer Science Address 3 avenue lamine, cité ezzahra, Sousse 4000 Tunisia tel: +216 97 246 706 (+33640302046 jusqu'au 15/6) fax: +216 71 391 166 [[alternative HTML version deleted]] __ R-h

[R] multiple lines with the same data frame?

2011-10-17 Thread Adel ESSAFI
Bonjour I have this data frame and I am newbie in R. I want to ask if it is possible to draw 10 lines in a plot such that: a line for every colomn, the x - axis is the second column and the y-axis is the third one. Thank you for any input 1 0 1094442 1 0.2 1163576.2 1 0.4 1238539.6 1

[R] two ecdf in the same figure

2011-09-24 Thread Adel ESSAFI
Hello, is ot possible to draw two ecdf of vectors (say s1 and s2) on the same figire with R. plot function draws a new plot and there is no function like points or lines to draw a second ecdf on the figure. Regards -- *PhD candidate in Computer Science Address 3 avenue lamine, cité ezzahra, S

Re: [R] draw points in R

2011-09-14 Thread Adel ESSAFI
alues 0 , 0.2 and 0.4 > > And here's one way to color them: > plot(x[,2], x[,3], col=c("red", "blue", "green")[as.factor(x[,1])], > xlab="X", ylab="Y", main="Colored Points") > > You might be interested in ?par

[R] draw points in R

2011-09-14 Thread Adel ESSAFI
Hello list I have this file 0 121289479 25 0 212599129 1 0 285254098 21 0 444889848 45 0 469197123 30 0 640007403 82 0 718215617 8 0 758534043 56 0 799706577 4 0 814441385 93 0 843545059 37 0.2 121289479 6 0.2 285254098 3 0.2 444889848 6 0.2

[R] printing big real values

2011-01-19 Thread Adel ESSAFI
Hello, I have a file with very big values. I want to display the real values with classic ways (without exposant) > summary(a[,1]); Min. 1st Qu.Median Mean 3rd Qu. Max. 1.198e+09 1.199e+09 1.200e+09 1.200e+09 1.201e+09 1.202e+09 Can you help please? Regards A

Re: [R] basic hist() question

2010-08-21 Thread Adel ESSAFI
thanks, I'am not veru used with R!! regards 2010/8/21 Henrique Dallazuanna > Adel, > > read.table return a data.frame, Gavin showed, you need pass which column > will be plotted to hist. > scan return a vector. > > > On Sat, Aug 21, 2010 at 10:59 AM, Adel ESS

[R] Fwd: basic hist() question

2010-08-21 Thread Adel ESSAFI
-- Forwarded message -- From: Adel ESSAFI Date: 2010/8/21 Subject: Re: [R] basic hist() question To: Henrique Dallazuanna It works fine. Could you explain to me why it did not worked for read.table? regards Adel 2010/8/21 Henrique Dallazuanna > Try this: > >

Re: [R] basic hist() question

2010-08-21 Thread Adel ESSAFI
Hi In fact, I searching for a simpler solution. I remember that I have done this without these functions (but I forgot) simply, is there any function that "force" R to take variable a as table ? Regards Adel > a=read.table("dureetasks.txt") > summary(a) V

[R] basic hist() question

2010-08-21 Thread Adel ESSAFI
Hi list I loaded the content of a file dureetasks.txt to variable a. This file contains an interger per line. when I print a vector, it displays correctly. however, when I try to print the histogram, I get this error message > a=read.table("dureetasks.txt") > hist(a) Error in hist.default(a) :

Re: [R] variation

2010-06-05 Thread Adel ESSAFI
2010/6/5 Adel ESSAFI > > > 2010/6/5 Jannis > > What exactly do you mean by "variation"? As I understand it, this term is a >> broad term for all kinds of different "spread measures" (like quantile range >> or standard deviation). Do you mean the Co

Re: [R] variation

2010-06-05 Thread Adel ESSAFI
to Yes, that what I mean. But I looked for ready function :) > compute the mean and the std.dev., it is straightforward to calculate > it. > > Adel ESSAFI schrieb: > >> Hi list >> I am a new user of R. I ask for some "beginner" question >> >&g

[R] Fwd: How to make R automatic?

2010-06-05 Thread Adel ESSAFI
-- Forwarded message -- From: Adel ESSAFI Date: 2010/6/5 Subject: Re: [R] How to make R automatic? To: zhangted001 Well, I am new but i will give you an example of script that I run cat exec2.sh R --no-save << EOF fl=list.files(pattern="*.dat") for(

[R] variation

2010-06-05 Thread Adel ESSAFI
Hi list I am a new user of R. I ask for some "beginner" question I am searching if there is any function that computes the variation of some discrete values of a vector (mean() and sd() exists, but i have not find variation). Thanks in advance Adel -- PhD candidate in Comput

[R] AIC score

2009-06-21 Thread Adel
hich stops the search. Does this means that Residual Sum of Squares (RSS) equals to zero that makes AIC goes to -inf .And how would I overcome this problem.Can I for example find those that have strong correlation with x1 first and then use AIC score to find me the best model among them,. Re