search for: faradj

Displaying 11 results from an estimated 11 matches for "faradj".

2018 May 29
1
How to generate a conditional dummy in R?
...s.na(x$Y[i])) { : argument is of length zero. For some reason the X1 produced less observations than it is in the data. But it's not a big deal - I identified those cases and simply deleted from the data (it was countries that only appeared twice in the data (e.g. USSR Yugoslavia etc). Best, Faradj > 29 maj 2018 kl. 02:15 skrev Jim Lemon <drjimlemon at gmail.com>: > > Hi Faradj, > What a problem! I think I have worked it out, but only because the > result is the one you said you wanted. > > # the sample data frame is named fkdf > Y2Xby3<-function(x) { &gt...
2018 May 29
0
How to generate a conditional dummy in R?
Hi Faradj, What a problem! I think I have worked it out, but only because the result is the one you said you wanted. # the sample data frame is named fkdf Y2Xby3<-function(x) { nrows<-dim(x)[1] X<-rep(0,nrows) for(i in 1:(nrows-2)) { if(!is.na(x$Y[i])) { if(x$Y[i] == 1 && any(is.na(...
2012 Jul 10
3
Need HELP: how find and use a csv file?
Hey, I am having some problems with importing a csv file into R and then saving it for analyzing. I got a csv file ( skater.csv) which i could read by typing: read.csv(file="/Users/kama/Desktop/skatter.csv", header=TRUE, sep=";") However, when i enter: skatter.csv<-read.csv("skatter.csv", header=TRUE) i get this message: Error in file(file,
2018 May 28
3
How to generate a conditional dummy in R?
Hi everyone, I am trying to generate a conditional dummy variable ?X" with the following rules set X=1 if Y is =1, two years prior to the NA. [0,0,NA]. For example, if the pattern for Y is 0,0,NA then the X variable is =0 for all the two years prior to the NA. If the pattern for Y is 0,1,NA or 1,0,NA then the X =1 . To be clear, if 1,1,NA then the X=1 that first specific year, it
2012 Dec 03
2
How to read SPSS file in R
...sep=",") Error in read.spss("/Users/kama/Analysis/Corporation.sav", header = TRUE, : unused argument(s) (header = TRUE, sep = ",") > Corp<-read.spss("/Users/kama/Analysis/Corporation.sav") re-encoding from UTF-8 Any suggestions please? Regards, Faradj Stockholm University -- View this message in context: http://r.789695.n4.nabble.com/How-to-read-SPSS-file-in-R-tp4651896.html Sent from the R help mailing list archive at Nabble.com.
2012 Jul 10
3
HELP me please with import of csv to R
Hey, I am having problems with importing a csv file to R. I could read the file by typing: read.csv(file="/Users/kama/Desktop/skatter.csv", header=TRUE, sep=";") However, i can not analyze the "skatter" - for ex, when i type: skatter = read.csv("skatter.csv") i get this message: Error in file(file, "rt") : cannot open the connection
2012 Nov 23
7
Why do i get "Error: unexpected input in "A<-lm(GandW ~ Authocracy, Data)"
Every time i insert : A<-lm(GandW ~ Authocracy;Data) i get this Error. Iam using Mac. And i have checked that "Data" has been read correctly. The same command with the same Data has been used by a friend who is using Linux. Thanks for help! Stockholm university Faradj -- View this message in context: http://r.789695.n4.nabble.com/Why-do-i-get-Error-unexpected-input-in-A-lm-GandW-Authocracy-Data-tp4650559.html Sent from the R help mailing list archive at Nabble.com.
2016 Apr 28
0
Robust clustered errors for probit ordinal regression analysis
...r help with obtaining robust clustered errors. I use polr command in MASS package m<?porl(y~x1+x2,data=mydata, method=probit). In the rms package, this is as simple as: clusterSE<?robcov(m, mydata$id). Is it possible to do something similar for polr object as well? Thank you very much Best, Faradj [[alternative HTML version deleted]]
2012 Dec 02
6
Warning message: In scan(file, what, nmax...)
...: Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : number of items read is not a multiple of the number of columns I wonder what Iam doing wrong. i guess it is something simple, however, i do not understand the help-function in R. Thank you, Regards, Faradj Stockholm university Department of Political Science -- View this message in context: http://r.789695.n4.nabble.com/Warning-message-In-scan-file-what-nmax-tp4651689.html Sent from the R help mailing list archive at Nabble.com.
2012 Jul 10
0
R-help Digest, Vol 113, Issue 13
...(peziza) > 60. Re: Skipping lines and incomplete rows (arun) > 61. Re: calculating the difference between days? (arun) > 62. Re: estimation of NA by predict command (eliza botto) > 63. Times Series Data using GLS (MRB305) > 64. Need HELP: how find and use a csv file? (Faradj Koliev) > 65. Re: estimation of NA by predict command (arun) > 66. Changing x-axis values displayed on histogram (jlwoodard) > 67. Re: Package 'MASS' (polr): Error in svd(X) : infinite or > missing values in 'x' (Rune Haubo) > 68. Re: HELP me please...
2016 Apr 26
0
Predicting probabilities in ordinal probit analysis in R
Dear all, I have two questions that are almost completely related to how to do things in R. I am running an ordinal probit regression analysis in R. The dependent variable has three levels (0=no action; 1=warning; 2=sanction). I use the lrm command in the rms package: print( res1<- lrm(Y ~ x1+x2+x3+x4+x5+x6, y=TRUE, x=TRUE, data=mydata)) I simply couldn't make any sense of the