[R] Hmisc::latex and the use of \phantom

2016-10-29 Thread Justin Bem
Dear all,



Is it possible to avoid the use of \phantom with latex function ? when I run 
latex(latex=FALSE,…) I get an error message.



When I use Format(big.mark= ‘’ ‘’) the result appear correct in R console but 
not in Latex code. Is it a way to combine numprint with latex ? col.just= 
‘n{#}{#}’ donc work



Sincerly.



Provenance : Courrier pour 
Windows 10

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] two phases sampling

2013-01-10 Thread justin bem
Dear all,

I have a question about estimation in two phases sampling. 
I' have a first sample of household from a complex sampling S1, a second sample 
is drawned from S2. 

from S2, I compute an estimator y2, for households of S1 not in S2 I set y2=0. 
I have an estimator y1 on S1
My indicator is y=y1+y2. So the variance of y is v(y)=v(y1)+v(y2)+cov(y1,y2). 
Sampling theory indicate how to compute v(y1) and v(y2) but how can I compute 
cov(y1,y2) ?

Can the survey package help me for that ?


 
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Summary.formula question

2012-02-02 Thread justin bem
Dear all,

Before my question, I wish  to all of you my very best wishes for 2012.
I'm using summary.formula to make table. I have something like this :

s1-summary(fdh~cup5+cup6+schef+cpro1+stratify(id2),data=dat,na.include=F)
the output give the marginal row named overall, but is it possible to add a 
marginal column ?
 Sincerly


 
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : P values for vglm(zibinomial) function in VGAM

2011-09-02 Thread justin bem
Estimation is realized by MLE, estimators are asymptotically normal

Try this reg-vglm(...)
p.value-1-pnorm(abs(coef(reg)/sqrt(diag(vcov(reg)


 

Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774



De : suuz suuz_b...@hotmail.com
À : r-help@r-project.org
Envoyé le : Mardi 23 Août 2011 15h04
Objet : [R] P values for vglm(zibinomial) function in VGAM

Hi ,

I know this question has been asked twice in the past but to my knowldege,
it still hasn't been solved.

I am doing a zero inflated binomial model using the VGAM package, I need to
obtain p values for my Tvalues in the vglm output. code is as follows

 mod2=vglm(dmat~Season+Diel+Tidal.phase+Tidal.cycle,zibinomial, data=mp1)
 summary(mod2)

Call:
vglm(formula = dmat ~ Season + Diel + Tidal.phase + Tidal.cycle, 
    family = zibinomial, data = mp1)

Pearson Residuals:
               Min        1Q    Median        3Q     Max
logit(phi) -3.6496  0.273679  0.285619  0.296763  1.0974
logit(mu)  -6.3631 -0.029027 -0.020786 -0.011719 80.6051

Coefficients:
                  Value Std. Error   t value
(Intercept):1  2.365835   0.029142  81.18334
(Intercept):2 -3.182376   0.050054 -63.57944
SeasonSpring  -0.080840   0.054201  -1.49147
SeasonSummer   0.204781   0.049936   4.10083
SeasonWinter   0.385078   0.043874   8.77692
DielE         -0.079190   0.079859  -0.99163
DielM          0.071607   0.074620   0.95963
DielN          0.132377   0.036419   3.63488
Tidal.phaseNT -0.252715   0.054053  -4.67536
Tidal.phaseST  0.145777   0.045554   3.20010
Tidal.cycleF   0.114808   0.044897   2.55713
Tidal.cycleH  -0.074224   0.048063  -1.54428
Tidal.cycleL  -0.049681   0.047717  -1.04116

Number of linear predictors:  2 

Names of linear predictors: logit(phi), logit(mu)

Dispersion Parameter for zibinomial family:   1

Log-likelihood: -7831.693 on 30569 degrees of freedom

Number of Iterations: 13 

I have tried the suggestions 
pt(coef(summary(mod2)), 30569, lower.tail = TRUE, log.p = FALSE)

Value Std. Error      t value
(Intercept):1 0.9910021735  0.5116242 1.00e+00
(Intercept):2 0.0007310901  0.5199600 0.00e+00
SeasonSpring  0.4677849543  0.5216125 6.792427e-02
SeasonSummer  0.5811276264  0.5199133 9.999794e-01
SeasonWinter  0.6499089525  0.5174974 1.00e+00
DielE         0.4684409796  0.5318250 1.606939e-01
DielM         0.5285424555  0.5297410 8.313752e-01
DielN         0.5526565030  0.5145256 9.998607e-01
Tidal.phaseNT 0.4002451101  0.5215532 1.473475e-06
Tidal.phaseST 0.5579507181  0.5181669 9.993124e-01
Tidal.cycleF  0.5457011061  0.5179053 9.947207e-01
Tidal.cycleH  0.4704164848  0.5191670 6.126507e-02
Tidal.cycleL  0.4801883607  0.5190291 1.489050e-01

pt(coef(mod2), 30569)

(Intercept):1 (Intercept):2  SeasonSpring  SeasonSummer  SeasonWinter
0.9910021735  0.0007310901  0.4677849543  0.5811276264  0.6499089525 
        DielE         DielM         DielN Tidal.phaseNT Tidal.phaseST 
0.4684409796  0.5285424555  0.5526565030  0.4002451101  0.5579507181 
Tidal.cycleF  Tidal.cycleH  Tidal.cycleL 
0.5457011061  0.4704164848  0.4801883607


But these seem to be giving strange results, those which are clearly more
different to the basline levels (Autumn, D, bl and E) are coming up as least
significant. Perhaps it is my interpretation.

I couldnt follow
2*min(pt(coef(summary(mod2)), 30569), 1-pt(coef(summary(mod2)), 30569)) 
??

Does anyone know what I might be doing wrong or how to go about the last
code? 

I have read as much as I can find on VGAM and zib but have ran out of ideas.
I apologise if this appears to be a beginners question.

many thanks in advance

--
View this message in context: 
http://r.789695.n4.nabble.com/P-values-for-vglm-zibinomial-function-in-VGAM-tp3762858p3762858.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Obtain beta regression estimation for betareg and VGAM package

2011-08-17 Thread justin bem
Dear all,

I'm trying to estimate beta regression with the betareg package and VGAM package

With the betareg package (Cribari-Neto and Zeilis) I use this code

betareg(formula, data) 


In my mind it possible with VGAM function vglm as 


vglm(formula,betaff, data) 


But betaff have two shapes and all coefficients are doubled in the second 
estimation. Is it possible to obtain the same estimation with the two packages ?

 
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : Obtain beta regression estimation for betareg and VGAM package

2011-08-17 Thread justin bem
I have found the solution 


betareg(formula, data) is equivalent to vglm(formula,betaff(zero=2),data)

Sorry for the previous post.

 
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774


- Mail original -
De : justin bem justin_...@yahoo.fr
À : R Maillist r-h...@stat.math.ethz.ch
Cc : 
Envoyé le : Mercredi 17 Août 2011 20h30
Objet : [R] Obtain beta regression estimation for betareg and VGAM package

Dear all,

I'm trying to estimate beta regression with the betareg package and VGAM package

With the betareg package (Cribari-Neto and Zeilis) I use this code

betareg(formula, data) 


In my mind it possible with VGAM function vglm as 


vglm(formula,betaff, data) 


But betaff have two shapes and all coefficients are doubled in the second 
estimation. Is it possible to obtain the same estimation with the two packages ?

 
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] vglm regression with weibull distribution

2011-08-17 Thread justin bem
Dear all,

I'm facing a problem in estimation of glm model with weibull distribution. I 
run this :

eqn0-formula(fdh~cup1+cup2+cup3+cup4+fin1+vd1+cm2+cm4+milieu+cpro1+cpro2+cpro3a+cpro3b+schef+log(y))
regWeib0-vglm(eqn0,family=weibull,subset(br, fdh1))

I have en estimation but there is a message saying that regularity conditions 
are violated :

Message d'avis :
In eval(expr, envir, enclos) :
  MLE regularity conditions are violated(shape = 2) at the final iteration


Then I haved try to apply solution provide in help of the package that 
consisted to use lschape=logoff and eschape=list(offset=-2)

regWeib0-vglm(eqn0,family=weibull(lshape='logoff',eshape=list(offset=-2)),subset(br,
 fdh1))


Erreur dans if ((temp - sum(wz[, 1:M, drop = FALSE]  wzepsilon))) 
warning(paste(temp,  : 
  l'argument n'est pas interprétable comme une valeur logique
De plus : Message d'avis :
In log(theta + offset) : production de NaN


Finaly i use the above function to find initial value for shape (a) and scale 
(b) 

weibullPar-function(x){
 f-function(p,mu=mean(x), sig=((length(x)-1)*var(x))/length(x)){
  n-length(x)
  a-p[1]
  b-p[2]
  t1-(mu-b*gamma(1+1/a))^2
  t2-(sig-((b^2)*gamma(1+2/a)-mu^2))^2
  rval-t1+t2
  rval
  }
  optim(c(1,1),f)$par
}

With the founded initial values I have I have the message. But When try great 
initial value for ishape and iscale I have this 


regWeib0-vglm(eqn0,family=weibull(lshape='logoff',lscale='loge',eshape=list(offset=-2),ishape=22,iscale=6),subset(br,
 fdh1))
Messages d'avis :
1: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  1525 elements replaced by 1.819e-12
2: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  1525 elements replaced by 1.819e-12
3: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  1525 elements replaced by 1.819e-12
4: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  1525 elements replaced by 1.819e-12
5: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  1525 elements replaced by 1.819e-12
6: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  1525 elements replaced by 1.819e-12
7: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  1525 elements replaced by 1.819e-12
8: In checkwz(wz, M = M, trace = trace, wzeps = control$wzepsilon) :
  1525 elements replaced by 1.819e-12
9: In eval(expr, envir, enclos) :
  MLE regularity conditions are violated(shape = 2) at the final iteration


MLE regularity condition are still violated but a solution is find !



Can some one help me ? 



Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774 

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Install.package error

2011-07-06 Thread justin bem
When try to use install.package I have this error message :

Error in m[, 1L] : incorrect dimensions number

What the matter with my installation ? I run R2.13 on Window 7 32bits.

 

Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] SAS Mixed

2011-06-13 Thread justin bem
 

I have drink the cup down to the last drop in a course on linear models with 
SAS. I didn't learn a lot about statistic the 95 percent of the course consist 
of stupid SAS outputs, with a teacher who is a SAS Guru.

Is there and equivalent of repetead option for mixed in R (I hope No for me 
it's stupid to loose parcimony by enlarging explanatory variables space) ?

 

Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : descriptive statistics

2010-12-13 Thread justin bem
A nice way to obtain summary for data is to use summary.formula in Hmisc 
package.

 Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774





De : Jim Lemon j...@bitwrit.com.au
À : effeesse scarpin...@gmail.com
Cc : r-help@r-project.org
Envoyé le : Lun 13 décembre 2010, 11h 23min 15s
Objet : Re: [R] descriptive statistics

On 12/13/2010 09:04 PM, effeesse wrote:

 Hi. In a data set I have a variable that takes values from 1 to 14. For each
 subgroup of values of this variable, I would like to obtain some descriptive
 statistics of other variables present in the data set. I've been trying with
 a for loop but I couldn't get nothing. Could you please suggest me some
 lines?

Hi effeesse,
Sure:

testmat-data.frame(sample(1:14,50,TRUE),rnorm(50),runif(50))
by(testmat[,-1],testmat[,1],mean)

Jim

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : Re : descriptive statistics

2010-12-13 Thread justin bem
With summary do this

my.summary-function(x) c(mean(x),var(x))

summary(v1~V, fun=my.summary,data=df)
summary(v2~V, fun=my.summary,data=df)
summary(v3~V, fun=my.summary,data=df)
summary(v4~V, fun=my.summary,data=df)
summary(v5~V, fun=my.summary,data=df)

If you want you get the mean of all variable together in all table

my.summary-function(x) 
c(mean(x[,1]),mean(x[,2]),mean(x[,3]),mean(x[,4]),mean(x[,5]))
summary(cbind(v1,v2,v3,v4,v5)~v,data=df)

 Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774





De : effeesse scarpin...@gmail.com
À : r-help@r-project.org
Envoyé le : Lun 13 décembre 2010, 15h 14min 22s
Objet : Re: [R] Re :  descriptive statistics


I am sorry, but I cannot understand how to use the summary function. Maybe,
if I describe my needs, you could sketch a line that could work.
In the data set variable V can take values 1 to 14. For the subgroup of
individuals where V takes value =1 I want the mean and variance of a
certain set of other variables (V1, V2, V3, V4, V5). And this for all the
other subgroups for values 2 to 14.
What do you suggest?
-- 
View this message in context: 
http://r.789695.n4.nabble.com/descriptive-statistics-tp3085197p3085462.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Fitting GLM with BFGS algorithm

2010-10-26 Thread justin bem
Dear all,

By default the glm function in the stats package use IWLS. How can I fit a glm 
model using BFGS algorithm ?
 Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Error with read.ssd

2010-05-09 Thread justin bem
Dear all,

I'm trying to read and sas file hen using read.ssd, I got this error message:

symbolic links are not supported 

I have debug read.ssd function and the function file.symlink is used. I 
run windows XP on virtual box, hosted by Vista Home 


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : SAS and R on multiple operating systems

2010-04-07 Thread justin bem
There is a possibility of integration of SAS with and other statistic package 
like Stata, etc.  with Latex by using statweave software.

http://www.cs.uiowa.edu/~rlenth/StatWeave/  or 
http://stat.uiowa.edu/~rlenth/StatWeave/OLD/SRC-talk.pdf


Sincerly.
 
Justin BEM
BP 1917 Yaoundé Cameroon
Tél (237) 76043774





De : Daniel Nordlund djnordl...@verizon.net
À : r-help@r-project.org
Envoyé le : Mer 7 avril 2010, 7 h 27 min 37 s
Objet : Re: [R] SAS and R on multiple operating systems

 -Original Message-
 From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
 On Behalf Of Roger DeAngelis(xlr82sas)
 Sent: Tuesday, April 06, 2010 6:35 PM
 To: r-help@r-project.org
 Subject: Re: [R] SAS and R on multiple operating systems
 
 
 Thanks Dennis,
 
 Thanks for taking the time that was a very informed response. It was a
 teachable moment for me.
 
 I didn't know about the breath and depth of LaTeX. I need to do some
 self education.
 Unfortunately I don't see how to integrate LaTeX with SAS, since SAS has
 its
 own template/tagset languages.
 
 I have not heard much about Framemaker in recent history. Adobe, like
 Microsoft and SAS keeps coming out with reincarnations of old products.
 
   I see a substantial potential for R in Pharma. Recently I spent several
 months working on a large meta analysis project involving 100s of journal
 articles, We integrated the R meta package with SAS to get the
 fixed/random
 effects and used SAS for input and final reports.
 
SAS simply cannot keep up with new statistical algorithms.
 
 I wish I could show you some of  style guides I have seen at various
 pharma
 companies. Here is a sanitized hint on how some of them talk about
 mathematical symbols.  Some pharma companies even have custom toolbars to
 help the medical writers insert mathematical symbols. Bring up the
 appropriate character map in word, usually the symbol map, select the
 appropriate character and hit the insert character button.
 
 I do use unicode in SAS for scripting some simple mathematical text.
 
 Regards
 
 
 

Roger,

You might try Google-ing for SASweave.  It is apparently similar to sweave 
and facilitates using Latex with SAS.

Hope this is helpful,

Dan

Daniel Nordlund
Bothell, WA USA


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : calling combinations of variable names

2009-09-08 Thread justin bem
may be this can work 

testfun-function(x) {
  rval=
  k-length(x)
  for (i in 1: k) rval-paste(rval,x[i],sep=-)
  rval
}

v1-paste(evalr,1:4,sep=)
eval-expand.grid(w=v1,x=v1,y=v1,z=v1)
n-dim(eval)[1]

results-rep(, n)

for (i in 1:n) {
row-unique(unlist(eval[i,]))

if (length(row)=3) results[i]-testfun(row)
}

You just have to replace testfun by your own function in this case ICC.

Sincerly.

 Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774





De : Helter Two helter...@care2.com
À : r-help@r-project.org
Envoyé le : Lundi, 7 Septembre 2009, 18h17mn 22s
Objet : [R] calling combinations of variable names

R-2.9.1, Windows7

Dear list,

I have a question to you that seems very simple to me, but I just can't
figure it out.
I have a dataframe called ratings which contains the following
variables: evalR1, evalR2, evalR3, evalR4, scoreR1, scoreR2, scoreR3,
scoreR4, opinionR1, opinionR2, opinionR3, opinionR4. (there are more
variables, but this gives an idea of the data structure). 

What I want is run several analyses on all 3 or 4-combinations of a
given variable. So, for example, I want to compute the following ICC's
(function from the psych package):
ICC(cbind(evalR1,evalR2, evalR3))
ICC(cbind(evalR1,evalR2, evalR4))
ICC(cbind(evalR1, evalR3, evalR4))
ICC(cbind(evalR2, evalR3, evalR4))
ICC(cbind(evalR1, evalR2, evalR3, eval4)).

I create a matrix containing the 3-combinations by combn(4,3). Now I
need to call the variables into the function. 
First, I tried paste as follows:
combis - combn(4,3) # this gives the 3-combinations
attach(ratings)
eval -
paste(evalR,combis[1,1],,evalR,combis[2,1],,evalR,combis[3,1],sep
=)
(this is of course just for 1 combination, as an example)
the output of this is evalR1,evalR2,evalR3, but when I run
ICC(cbind(eval)), an error message is given which is not given when I
enter ICC(cbind(evalR1,evalR2, evalR3)) manually. The function appears
not to recognize the variable names. It also does not work to type
ICC(cbind(unquote(eval))).
Alternatively, I have tried the cat function, but also here ICC does not
recognize the input as variable names. 

What am I doing wrong? How can I automatically construct the set of
variable names such that a function recognizes them as variable names?
ICC is one example, but there are also other computations to be run and
the set of variables is pretty large, so typing the combinations of
variable names manually is really unattractive.

What am I missing? It seems to me that there probably is a very simple
solution in R, but which?

Thank you,
Peter Verbeet


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Heckman probit ?

2009-08-20 Thread justin bem


 Is there a function to fit heckman probit model in R ?

Sincerly..

Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] IIA test

2009-07-09 Thread justin bem
Dear all,

I'am using mlogit to test IIA hypothesis. I'get the test statistique who is 
negative, a p-value of 1, and a text saying that the IIA hypothesis is rejeted. 
Does a negative value mean that constraint model is more efficient that that 
the full model ? what to do in this case ?

Sincerly.

 Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : Support Vector Machines

2009-05-05 Thread justin bem
there is a SVM function in svmpath by Trevor Hastie. Before use it take time to 
read this 

http://www-stat.stanford.edu/~hastie/Papers/svmpath.pdf

If you install then svmpath library ! run the attach source file.


Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 





De : excalibur servien.rem...@yahoo.fr
À : r-help@r-project.org
Envoyé le : Mardi, 5 Mai 2009, 8h49mn 49s
Objet : Re: [R] Support Vector Machines


In the R-help of the svm function of the package e1071 it's explained that
this function also makes estimation of density.

But when i made for example
X-rnorm(1000)
m-svm(X)

I just have a binary classification of X like SVM do whereas i want an
estimation of the density which generates our sample X ...

I don't know if it's possible and if someone has already use this function
to do that.

Thanks.


David Winsemius wrote:
 
 
 On May 4, 2009, at 8:52 AM, excalibur wrote:
 

 This question is still unanswered.
 
 Unanswered questions are often those which do not comply with the  
 guidelines in the Posting Guide. Many people have gotten tired of  
 either making up examples or of writing  Read the Posting Guide, so  
 they just ignore them.
 
 
 Someone can explain me how use the svm function to make density  
 estimation ?
 
 If you post an executable bit of code that shows how you are doing  
 those operations, then I suspect someone will answer.
 
 excalibur wrote:


 Hi,
 i try to use function svm of package e1071 to estimate a density.

 But if my data are X=(X1,...,Xn) and m-svm(X) some values of m$SV  
 are
 less than 0.
 I don't see how i can get the estimation of the density with this
 function.

 Thanks for your help.

 Rémi

 
 David Winsemius, MD
 Heritage Laboratories
 West Hartford, CT
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 

-- 
View this message in context: 
http://www.nabble.com/Support-Vector-Machines-tp19069442p23382683.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  __
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : Re : Support Vector Machines

2009-05-05 Thread justin bem
Of course SVM is for supervise learning method (classification or regression). 
You cannot use a boat to fly man !
 
Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 







Envoyé le : Mardi, 5 Mai 2009, 16h07mn 10s
Objet : Re : [R] Support Vector Machines


Thank you.

I will look this later but I think i've saw this function and i'm not sure that 
we can make density estimation with this but only classification.


 :


Objet: Re : [R] Support Vector Machines

Cc: R Maillist r-h...@stat.math.ethz.ch
Date: Mardi 5 Mai 2009, 16h43


there is a SVM function in svmpath by Trevor Hastie. Before use it take time to 
read this 

http://www-stat.stanford.edu/~hastie/Papers/svmpath.pdf

If you install then svmpath library ! run the attach source file.


Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 






À : r-help@r-project.org
Envoyé le : Mardi, 5 Mai 2009, 8h49mn 49s
Objet : Re: [R] Support Vector Machines


In the R-help of the svm function of the package e1071 it's explained that
this function also makes estimation of density.

But when i made for example
X-rnorm(1000)
m-svm(X)

I just have a binary classification of X like SVM do whereas i want an
estimation of the density which generates our sample X ...

I don't know if it's possible and if someone has already use this function
to do that.

Thanks.


David Winsemius wrote:
 
 
 On May 4, 2009, at 8:52 AM, excalibur wrote:
 

 This question is still unanswered.
 
 Unanswered questions are often those which do not comply with the  
 guidelines in the Posting Guide. Many people have gotten tired of  
 either making up examples or of writing  Read the Posting Guide, so  
 they just ignore them.
 
 
 Someone can explain me how use the svm function to make density  
 estimation ?
 
 If you post an executable bit of code that shows how you are doing  
 those operations, then I suspect someone will answer.
 
 excalibur wrote:


 Hi,
 i try to use function svm of package e1071 to estimate a density.

 But if my data are X=(X1,...,Xn) and m-svm(X) some values of m$SV 
 are
 less than 0.
 I don't see how i can get the estimation of the density with this
 function.

 Thanks for your help.

 Rémi

 
 David Winsemius, MD
 Heritage Laboratories
 West Hartford, CT
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 

-- 
View this message in context: 
http://www.nabble.com/Support-Vector-Machines-tp19069442p23382683.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Sub-saharan Africa R user forum

2009-04-27 Thread justin bem
A new forum on R for french speaker in sub-saharan africa

 http://aurass.forum-free.org
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : PCA and automatic determination of the number of components

2009-04-20 Thread justin bem
See ade4 or mva package.
 Justin BEM
BP 1917 Yaoundé



De : nikolay12 nikola...@gmail.com
À : r-help@r-project.org
Envoyé le : Lundi, 20 Avril 2009, 4h37mn 41s
Objet : [R] PCA and automatic determination of the number of components


Hi all, 

I have relatively small dataset on which I would like to perform a PCA. I am
interested about a package that would also combine a method for determining
the number of components (I know there are plenty of approaches to this
problem). Any suggestions about a package/function?

thanks,

Nick
-- 
View this message in context: 
http://www.nabble.com/PCA-and-automatic-determination-of-the-number-of-components-tp23129941p23129941.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : function question

2009-03-20 Thread justin bem
Yes  because in OOP the constructor have the same name with class
 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 





De : Bert Gunter gunter.ber...@gene.com
À : Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no; 
r-help@r-project.org
Envoyé le : Jeudi, 19 Mars 2009, 21h16mn 13s
Objet : Re: [R] function question

[[elided Yahoo spam]]

is.function(vector)  ##TRUE

-- Bert 

-Original Message-
From: Wacek Kusnierczyk [mailto:waclaw.marcin.kusnierc...@idi.ntnu.no] 
Sent: Thursday, March 19, 2009 1:03 PM
To: Bert Gunter
Cc: Edna Bell; R help
Subject: Re: [R] function question

Bert Gunter wrote:
 Edna:

 Please make at least a minimal effort to answer such questions before
 posting.

 is.vector(function(x)x) ## FALSE
 as.vector(function(x)x) ## try it

 or even

 is.vector(plot)

  

... or even the surprizing

    is.vector(vector)

vQ

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : function question

2009-03-19 Thread justin bem
Functions and vectors are both objects in R, but a functions are not vectors

try this
foo-function() print(I'm the foo function)
is.vector(foo)
as.vector(foo)

 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 





De : Edna Bell edna.bel...@gmail.com
À : r-h...@stat.math.ethz.ch
Envoyé le : Jeudi, 19 Mars 2009, 17h49mn 32s
Objet : [R] function question

Dear R Gurus:

I read somewhere that functions are considered vectors.

Is this true, please?

thanks
Edna Bell

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : Randomly splitting a data frame in half

2009-03-19 Thread justin bem
selected-sample(nrow(data),19811)
randomsample1 - data[selected,]
randomsample2 - data[-selected,] # for non select

But I think is good to have a variable that indicate selected and not selected 
cases in same data frame.

You can try this

selected-rep(0,39622)
selected[sample(1:39622,39622/2)]-1
data$selected-selected
rm(selected)

or 

data$selected-rbinom(39622,1,.5)


select case have the value 1, non-selected have value 0. In the second case, 
you will not get exactly .5 !
Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 





De : Christopher David Desjardins cddesjard...@gmail.com
À : r-help@r-project.org
Envoyé le : Jeudi, 19 Mars 2009, 19h08mn 48s
Objet : [R] Randomly splitting a data frame in half

I have a data frame in long format and I would like to randomly divide this 
data frame in half. The data frame consists of 39622 rows and I initially tried 
...

randomsample1 - data[sample(nrow(data),19811), ]

Where allows me to randomly select half of the rows and assign them to 
randomsample1 but then I couldn't figure out how to select those rows that were 
not selected and assign them to randomsample2.

Please cc me if you reply as I'm a digest subscriber.
Thanks,
Chris

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : BOOTSTRAP_CROSS VALIDATION

2009-03-16 Thread justin bem
See the boot package
 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 





De : per243 jose.perezsua...@csiro.au
À : r-help@r-project.org
Envoyé le : Lundi, 16 Mars 2009, 0h12mn 03s
Objet : [R] BOOTSTRAP_CROSS VALIDATION


I need a script that works for Bootstrap validation. 
Could someone explain me when should I use the Bootstrap technical or
Jackknife?
Thanks 

-- 
View this message in context: 
http://www.nabble.com/BOOTSTRAP_CROSS-VALIDATION-tp22529500p22529500.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] nested logit estimation

2009-03-12 Thread justin bem
Dear all,

Is there a function to fit nested logit available somewhere ?

Sincerly
 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : Converting a dataframe to a matrix

2009-03-11 Thread justin bem
Something like this will work

m-matrix(df1$likes, nr=3,nc=3,byrow=T)
colnames(m)-unique(df1$color)
rowlnames(m)-unique(df1$name)

 Sincerly.
Justin BEM
BP 1917 Yaoundé Cameroun
Tél (237) 76043774






De : Jennifer Brea b...@fas.harvard.edu
À : r-help@r-project.org
Envoyé le : Mercredi, 11 Mars 2009, 6h42mn 29s
Objet : [R] Converting a dataframe to a matrix

If I have a dataframe which is organized like this:

  name color likes?
1 sally  red    0
2 sally  blue    1
3 sally green    1
4  jake  red    0
5  jake  blue    1
6  jake green    1
7  tom  red    1
8  tom  blue    0
9  tom green    0


And I want to create a matrix in the form:

    red blue green
sally  0    1    1
jake    0    1    1
tom    1    0    0


Are there any built-in commands that might help me do this?  Also, I can't 
assume that there is an observation for every person-color.  In other words, in 
the original dataset, there might be some colors for which sally offered no 
opinion.  In some cases, this may be represented by NA, in others, it may mean 
that no row exists for sally for that color.

Thank you!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : t-test, survey data

2009-03-11 Thread justin bem
For survey data, the survey package provides methods for variance estimation.
 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 





De : Marie Vandresse v...@plan.be
À : r-help@r-project.org
Envoyé le : Mercredi, 11 Mars 2009, 9h25mn 11s
Objet : [R] t-test, survey data



    *How can I do a t-test with survey data?*


Thanks.

Marie


-- 







-

Le Bureau fédéral du Plan fête ses 50 ans en 2009.

Het Federaal Planbureau viert zijn 50-ste verjaardag in 2009.

The Federal Planning Bureau celebrates its 50-th anniversary in 2009.

-

Disclaimer: please see www.plan.be/disclaimer.html

Please, think before you print...

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : (no subject)

2009-03-10 Thread justin bem
see ?unique

 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246





De : arnaud_mosn...@uqar.qc.ca arnaud_mosn...@uqar.qc.ca
À : r-help@r-project.org
Envoyé le : Mardi, 10 Mars 2009, 17h15mn 57s
Objet : [R] (no subject)


Dear R users,

I have a table with the following form

STATION  X   Y
1-7030
1-7030
1-7030
2-7229
2-7229
2-7229
2-7229

How want to extract unique value for those columns ... I am sure it is 
very[[elided Yahoo spam]]

I want to obtain something like

STATIONX Y
1-7030
2-7229

Thanks !!!

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : How to optimize a matrix

2009-03-09 Thread justin bem
See ?optim 
See ?mle (stats4 package)
or  help.search(MLE) 

 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246





De : b88207...@ntu.edu.tw b88207...@ntu.edu.tw
À : r-help@r-project.org
Envoyé le : Lundi, 9 Mars 2009, 6h55mn 20s
Objet : [R] How to optimize a matrix

I would like to estimate the sigma matrix of multinormal distribution through 
ML.
But I don't know how to optimize the parameter sigma.

Could any one help me?

Thank you so much~

Yen Lee

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : PCA and categorical data

2009-03-06 Thread justin bem
See homals package in R. But also look documents for ade4 package. 
 
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774
 




De : Galanidis Alexandros a...@env.aegean.gr
À : r-help@r-project.org r-help@r-project.org
Envoyé le : Vendredi, 6 Mars 2009, 10h09mn 18s
Objet : [R] PCA and categorical data

Hi all,

I' m trying to figure out if it is appropriate to do a PCA having only 
categorical data (not ordinal). I have only find the following quote:

One method to find such relationships is to select appropriate variables and
to view the data using a method like Principle Components Analysis (PCA) [4].
This approach gives us a clear picture of the data using KL-plot of the PCA.
However, the method is not settled for the data including categorical data.
[http://hp.vector.co.jp/authors/VA038807/personal/covEigGiniRep17.pdf]

but I'm still not sure if it WRONG to do so.

Any opinion or reference would be very helpful

thanks

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : SVM regression code

2009-02-19 Thread justin bem
there is svmpath package by Trevor Hastie
 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 





De : Alex Roy alexroy2...@gmail.com
À : r-help@r-project.org
Envoyé le : Jeudi, 19 Février 2009, 9h19mn 18s
Objet : [R] SVM regression code

Dear R user,
                    I am looking for SVM regression in R. It willl be
helpful for me if some one send me SVM regression code.
Thanks

Alex

    [[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : standard error of logit parameters

2009-01-28 Thread justin bem
Run 


outfit-nlm(..., hessian=T) and then standards error are
se-diag(solve(outfit$hessian))


 
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774

 




De : Bomee Park bom...@stanford.edu
À : r-help@r-project.org
Envoyé le : Jeudi, 29 Janvier 2009, 4h01mn 56s
Objet : [R] standard error of logit parameters

Hi everyone.

I am now estimating the parameters for a logit model, and trying to get the 
estimates by laximizing the log_likelihood.
The nlm function works nicely for maximizing the -(log_likelihood) and returns 
the parameter estimates that minimize the static, and the gradients also, but 
don't have any clue how I can get the standard error for the parameters.

Any help will be greatly appreciated.
Thanks.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : Need help on running Heckman Correction Estimation using R

2009-01-27 Thread justin bem
See the micEcon package. there is and heckit function
 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 





De : Kishore gladikish...@gmail.com
À : r-help@r-project.org; r-h...@stat.math.ethz.ch
Envoyé le : Mardi, 27 Janvier 2009, 11h54mn 00s
Objet : [R] Need help on running Heckman Correction Estimation using R

Team,

I am trying to resolve the self-selection bias of a sample in an experiment
and would like to run the Heckman Correction Estimation using R.  Can
someone help me with the R-Code... I tried searching for the discussion, but
not successful. Thanks in advance,

Best,

Kishore/..
http://kaykayatisb.blogspot.com

    [[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Specify nonlinear equation with nlme

2008-12-20 Thread justin bem
Dear all,

I want to estimate a nonlinear mixed effect model using nlme package or lme4. 
How can I specify this

y=exp(B'X)/(1+exp(B'X)). the same model can be obtained with logit(y)=B'X but  
I have many value of 1 in y logit(1)=Inf.


 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] specify formula for nonliear mxed model equation

2008-12-19 Thread justin bem
How can I specify formula using nlme to estimate y=exp(X'B)/(1+exp(X'B)) ?

 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] problem with Surv

2008-12-15 Thread justin bem
Dear all,

I'm trying to estimate a tobit model with  survrec function. I use the 
following code : 
reg-survreg(Surv(crs_prod,crs_prod=1)~SOLVA+log(AF088)+HHI+ACTIONNA,data=dat,dist=gaussian)

I get this error message with R 2.7.2 
Error in survreg(Surv(crs_prod, crs_prod = 1) ~ SOLVA + log(AF088) +  : 
  Response must be a survival object

Can you help me ?

 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : A package to set up a questionnaire enter data

2008-12-10 Thread justin bem
I don't believe there exist one ! but for that purpose I use CSPRO who is 
free !  
http://www.census.gov/ipc/www/cspro/
 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 






À : r-help@r-project.org
Envoyé le : Jeudi, 11 Décembre 2008, 1h35mn 33s
Objet : [R] A package to set up a questionnaire  enter data


Hi R users,
Is there a Package in R to
- set up a questionnaire?
- enter data?
Best regards

-- 
View this message in context: 
http://www.nabble.com/A-package-to-set-up-a-questionnaire---enter-data-tp20947237p20947237.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : growing a list sequentially -- memory management

2008-11-14 Thread justin bem
you may try something like  

myres -tapply(1:n, as.factor(1:n) gen)

but n in very large in your case. 

you may create an external database and fill it

connect to you database

library(RODC)
con-odbcConnect(...)

st-seq(1,n, by=h)  
# since n=157347, h can be set to 1573 to have around that 100 loops

for ( i in 1: length(sh)){
    index-st(i):st(i+1)
    myres(tapply(index, factor(index),gen
    sqlwrite(myres,connexion,append=(i1))
}

It will be more faster .
 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 





De : Patrick Burns [EMAIL PROTECTED]
À : erwann rogard [EMAIL PROTECTED]
Cc : r-help@r-project.org
Envoyé le : Vendredi, 14 Novembre 2008, 12h37mn 35s
Objet : Re: [R] growing a list sequentially -- memory management

The recommended technique is to create objects
as their final size and then subscript into them
with your data.

My intuition (which is often brutally wrong) tells
me that your case should not be overly traumatic.
So I'm suspicious that you are fragmenting memory
in other ways as well.

Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and A Guide for the Unwilling S User)


erwann rogard wrote:
 hello,

 i have something like:

 out-list()

 for(i in 1:n){
  data-gen(...) #fixed size data
  out[[i]]- fun(data)
 }

  
 object.size(out[[1]])
    
 6824

 In principle 1 GB should allow

 n = 1024^3/6824 = 157347?

 i have about 2GB are not taken by other processes. however, I can see the
 memory shrinking quite rapidly on my system monitor and have to stop the
 simulation after only n=300. why such a discrepancy? any remedy?

 x86_64-pc-linux/RKWard/R2.8.0/ 4GB

 thanks.

     [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] A R forum for sub-saharan African R user

2008-11-11 Thread justin bem


Dear all,

I have create a new forum for all SSA R users. The forum link is 
http://aurass.forum-free.org

The forum language is french beacuse many people in SSA speak french. I hope 
that the forum will contribute to increase the number of R user in SSA because 
many companies in SSA fall in the describe in 
fortune(83)



Justin BEM
BP 1917 Yaoundé
Tél (237) 0023776043774


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : Regarding lme functions

2008-11-10 Thread justin bem
in nlme package you the intervals function.

myfit-lme(...)
intervals(myfit)


 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246





De : ratna ghosal [EMAIL PROTECTED]
À : r-help@r-project.org
Envoyé le : Lundi, 10 Novembre 2008, 17h51mn 51s
Objet : [R] Regarding lme functions

Hi all,

I recently got accquainted with the R stats and using the 'lme' function
for some of my analyses. Since I am a novice, I am facing a lot of
problems regarding the analyses. 

I have applied the Linear Mixed Effect model for my dataset and would like
to know the commands for extracting the confidence interval for the fixed
effect. 

Also would like to request if you can kindly guide me the command
for plotting the observed value vs the value predicted from the mixed
effect model.

Thanking you

Regards

Ratna




Ratna Ghosal
Research Scholar
Centre for Ecological Sciences
Indian Institute of Sciences
Bangalore-12

--- On Mon, 10/11/08, John Poulsen [EMAIL PROTECTED] wrote:

From: John Poulsen [EMAIL PROTECTED]
Subject: [R] Labeling points with xYplot
To: r-help@r-project.org
Date: Monday, 10 November, 2008, 9:56 PM

Hello R-Users,

I am trying to label points on an xYplot.  I can label the points, but then I
lose the error bars.  I suspect that I should be using panel.xYplot rather than
panel.xyplot, but that didn't work either...

Can anybody help me out?  Example code is below.  First xYplot has error bars,
second tries to label the points and the bars disappear.

Thanks,
John


a=c(1:4)
b=rnorm(4,15,5)
blab=b+1

xYplot(Cbind(b, b-1.5, b+1.5)~a,
   ylim=c(0,max(b)+3))

xYplot(Cbind(b, b-1.5, b+1.5)~a, ylim=c(0,max(b)+3),
   panel=function(x,y,...){
 panel.xyplot(x,y,...)
 ltext(x=list(1,2,3,4),
   y=list(13,14,15,16),
  
labels=list(A,B,C,D), pos=2)})

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  Share files, take polls, and make new friends - all under one roof. G
[[alternative HTML version deleted]]


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] sample selection mixed-effects model with nlme

2008-11-04 Thread justin bem

Dear all, 

I want to estimate this equation with repeated data.

log(y)=b0+b1*log(x1)+b2*log(x1)+B'Z+u

if y=0 then log(y) is undefined.  It seem to be a tobit model with panel 
data, can I do this in R with nlme, lme or plm ?
If not is it valid to use a two step procedure ? 



Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : panel data maximum likelihood function

2008-11-03 Thread justin bem
see plm, or lmer packages  

 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246





De : Migle Purzelyte [EMAIL PROTECTED]
À : r-help@r-project.org
Envoyé le : Lundi, 3 Novembre 2008, 0h26mn 21s
Objet : [R] panel data  maximum likelihood function

Hi,

I found some problems dealing with panel data. However, it seems the problem is 
maximum likelihood function.
I cannot find a function to compute maximum likelihood estimator for panel data 
as well as to test data with likelihood ratio test.
May anyone knows something about that?

Thanks,
Migle

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : how to restrict a parameter in optim()

2008-10-30 Thread justin bem
Where is the problem ? then you have to write the objective function with the 
restriced value before call optim()

 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246





De : Luis SAGAON TEYSSIER [EMAIL PROTECTED]
À : r-help@r-project.org
Envoyé le : Jeudi, 30 Octobre 2008, 10h11mn 08s
Objet : [R] how to restrict a parameter in optim()

 Dear all,

 I'm trying to estimate some parameters with the optim() function but I
 need to restrict one parameter and I have not found how to do it. Could
 you help me please?

 my program is basically

 fn-function(s)

 initial-function(r)
 {
 cst-r[1]
 cst1-r[2]
 beta-r[3]
 rho-r[4]
 p1-r[5]

 return(-sum())
 }

 parms-c()

 m0-optim()


 I need to specify 0=p1=1.

 Thank you very much

 Luis SAGAON

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : (a) Credit Scoring models and (b) aceesing earlier emails

2008-10-14 Thread justin bem
Go to this link http://defaultrisk.com/ you will find a lot about credit scoring


 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246



- Message d'origine 
De : saggak [EMAIL PROTECTED]
À : r-help@r-project.org
Envoyé le : Mardi, 14 Octobre 2008, 9h11mn 53s
Objet : [R] (a) Credit Scoring models and (b) aceesing earlier emails

Hi!
 
I have been reading lots of queries regarding logistic regression as well as 
Credit scoring model and the related replies, which I must admit are full of 
wisdom and help us to understand where do we stand. The contributions of Frank 
E Harrell Jr, etc are invaluable. Incidentally I am also trying to work on 
Credit scoring model and initially I tried to use the multiple regression etc. 
and now I am using logistic regression using R.
 
I have two queries.
 
(a)Can someone guide me as to how the credit score model should be 
developed step by step? I mean what are the steps involved in developing credit 
scorecard model? I have a sample database of 78000 bank customers and the 
period is April 2004 – March 2007 and I also have the their default / non – 
default position as on March 01, 2008. (There are 13756 defaulters). So using 
these defaulters (coded as 1)  / non defaulters (coded as 0) and using logistic 
regression, I have arrived at regression coefficients and then the Probability 
of default for each of these 78000 customers. Can someone guide me regarding 
the flow of credit scoring model? i.e. What are the steps involved in 
developing Credit scoring models? I don’t have access to the books, as these 
are most of the times very expensive and my organization being small and new, 
can’t afford buying them as of now. I hope you understand my problem.
 
(b)If I want to refer to earlier mails (I have recently become 
member of this R group), how do I access these mails e.g. suppose I want to 
refer to all the mails dealing with logistic regression, how do I do it?
 
Saggak


  Connect with friends all over the world. Get Yahoo! India Messenger at 
http://in.messenger.yahoo.com/?wm=n/
[[alternative HTML version deleted]]


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Multilevel SEM

2008-09-26 Thread justin bem
Dear all,

Is it possible to estimate a SEM with panel data in R ?

Sincerly
 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246 


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Tool for simple two class Fisher linear discriminant analysis?

2008-09-18 Thread justin bem
Use lda in MASS package

 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246



- Message d'origine 
De : Yip [EMAIL PROTECTED]
À : r-help@r-project.org
Envoyé le : Jeudi, 18 Septembre 2008, 8h04mn 23s
Objet : [R] Tool for simple two class Fisher linear discriminant analysis?


Could anyone kindly let me know what tool(s) in R are available/convenient
for Fisher linear discriminant analysis? I only need to handle the two class
tasks for now.

Thank you,
Yiping

-- 
View this message in context: 
http://www.nabble.com/Tool-for-simple-two-class-Fisher-linear-discriminant-analysis--tp19547168p19547168.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : How to import package into R script

2008-05-23 Thread justin bem
Read documentation carefully ! 
see ?library (e.g library(tseries)) 

 Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246



- Message d'origine 
De : Edward Wijaya [EMAIL PROTECTED]
À : r-help@r-project.org
Envoyé le : Vendredi, 23 Mai 2008, 4h23mn 06s
Objet : [R] How to import package into R script

Hi all,

What's the construct to import a built-in package
(e.g. ARIMA) into the R script.

I can't seem to find them in the documentation.

Regards,
Edward

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__


ble contre les messages non sollicités 

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : Unable to save plot as .pdf , ps , eps

2007-11-15 Thread justin bem
I simply use 

pdf(test.pdf) 
plot(rnorm(10))
dev.off()


postscript(test.ps) 

plot(rnorm(10))

dev.off()
 
Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246

- Message d'origine 
De : Luis Ridao Cruz [EMAIL PROTECTED]
À : [EMAIL PROTECTED]
Envoyé le : Jeudi, 15 Novembre 2007, 14h11mn 28s
Objet : [R] Unable to save plot as .pdf , ps , eps

R-help,

Whenever I try to save a plot with extension .pdf , ps or eps
I get the following error/warning message:

plot(rnorm(10))
savePlot(test,type=pdf)

Error in savePlot(test, type = pdf) : Invalid font type
In addition: Warning messages:
1: In savePlot(test, type = pdf) :
  font family not found in PostScript font database
2: In savePlot(test, type = pdf) :
  font family not found in PostScript font database


Can anyone let me know wht it is going on

Thanks in advance

 version
   _   
platform   i386-pc-mingw32 
arch   i386
os mingw32 
system i386, mingw32   
status 
major  2   
minor  6.0 
year   2007
month  10  
day03  
svn rev43063   
language   R   
version.string R version 2.6.0 (2007-10-03)

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.






  
_ 

l 
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : writing a categorical var. with condition

2007-11-09 Thread justin bem
see also ?cut
 
Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246



- Message d'origine 
De : [EMAIL PROTECTED] [EMAIL PROTECTED]
À : sigalit mangut-leiba [EMAIL PROTECTED]
Cc : r-help [EMAIL PROTECTED]
Envoyé le : Vendredi, 2 Novembre 2007, 22h33mn 52s
Objet : Re: [R] writing a categorical var. with condition

On 02-Nov-07 21:02:57, sigalit mangut-leiba wrote:
 Hello,
 I want to create a new variable which includes 4 age categories
 in this way: 
 if (age=12  age32) age1==1
 if (age=32  age52) age1==2
 if (age=52  age72) age1==3
 if (age=72  age100) age1==4
 
 but I get the results only for the first observation.
 
 how can I apply this condition to all observations?

If A is a vector of ages, one way to do it would be

age1 - 1*(A=12)(A32) + 2*(A=32)(A52) +
3*(A=52)(A72) + 4*(A=72)(A100)

Best wishes,
Ted.


E-Mail: (Ted Harding) [EMAIL PROTECTED]
Fax-to-email: +44 (0)870 094 0861
Date: 02-Nov-07  Time: 22:33:48
-- XFMail --

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


  
_ 

l 
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Re : how to create this graph?

2007-10-01 Thread justin bem
Try this

plot.new()
plot.window(xlim=c(0,10), ylim=c(0,15))

rect(1,0,2,10)
rect(2,0,4,4.1,col=grey)
rect(2,4.1,4,10,col=grey)

segments(0, 0, 5, 0)
segments(0, 10, 5, 10)

text(3,3.5,41)
text(3,6, 51)

text(4.5,3..5,G/V)
text(4.5,6, U)

 
Justin BEM
BP 1917 Yaoundé
Tél (237) 99597295
(237) 22040246

- Message d'origine 
De : squall44 [EMAIL PROTECTED]
À : r-help@r-project.org
Envoyé le : Lundi, 1 Octobre 2007, 8h41mn 44s
Objet : [R] how to create this graph?


Hello,

I'm trying to create the following graph:

http://www.nabble.com/file/p12974686/bar.gif 

Is there a command (like pie(...) or barplot(...)) or is this just a special
case of eg barplot?

I'd be glad if someone could give me a hint on where to start.

Regards,
Tobias
-- 
View this message in context: 
http://www.nabble.com/how-to-create-this-graph--tf4546742.html#a12974686
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.







  
_ 

l 
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.