[R] Is there a point-biserial corr version of mvrnorm?

2012-12-24 Thread Xiaoxu LI
Dear R fans, MASS::mvrnorm with empirical=T is very useful to reproduce practice data of published papers. Now I want to reproduce a binomial variable with multiple normal variables. The target paper gave a big corr table with sd(s) and Means including a GENDER variable. Is there a point-biserial

Re: [R] sem package fails when no of factors increase from 3 to 4

2008-12-23 Thread Xiaoxu LI
search could be recursive. I am writing sem sample codes for a popular Chinese SEM textbook. Hope sem package can be more powerful :) Xiaoxu On Tue, Dec 23, 2008 at 8:32 AM, John Fox wrote: > Dear Xiaoxu LI, > > sem.mod(mod4, cor18, 500, debug=TRUE) will show you what went wrong w

[R] sem package fails when no of factors increase from 3 to 4

2008-12-22 Thread Xiaoxu LI
I checked through every 3 factor * 3 loading case. While, 4 factor * 3 loading failed. the data is 6 factor * 3 loading require(sem); cor18<-read.moments(); 1 .68 1 .60 .58 1 .01 .10 .07 1 .12 .04 .06 .29 1 .06 .06 .01 .35 .24 1 .09 .13 .10 .05 .03 .07 1 .04 .08 .16 .10 .12 .06 .25

Re: [R] R and the Web: A small Wordpress plugin RwebFriend

2008-11-23 Thread Xiaoxu LI
e who need > to use statistical data in offices but dont have the background to learn it. > This can also be used in the present economic environment for some companies > to cut hardware and software costs by transitioning to R. > I am not sure if this is the right list , but any other th

[R] A small Wordpress plugin RwebFriend

2008-11-23 Thread Xiaoxu LI
Dear R fans, I wrote a trivial wordpress plugin for users of wordpress and Rweb (or other web interface ) Plugin URL: http://lixiaoxu.lxxm.com/rwebfriend/ Xiaoxu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Type III ANOVA of package car depends on factor level order

2008-11-17 Thread Xiaoxu LI
Xiaoxu ## School of Humanities & Social Sciences, Shenzhen Graduate School of Peking Univ. ## http://lixiaoxu.lxxm.com/ On Tue, Nov 18, 2008 at 7:19 AM, Xiaoxu LI <[EMAIL PROTECTED]> wrote: > ## I got it. IV(s) of interaction should be orthogonal to main effect IV(s). > ## Type III AN

Re: [R] Type III ANOVA of package car depends on factor level order

2008-11-17 Thread Xiaoxu LI
_2+disease),lm(y~disease*drug))$'Sum of Sq'[2] , anova(lm(y~x_interaction_2+drug),lm(y~disease*drug))$'Sum of Sq'[2] , anova(lm(y~disease+drug),lm(y~disease*drug))$'Sum of Sq'[2]) ) On Tue, Nov 18, 2008 at 3:27 AM, Xiaoxu LI <[EMAIL PR

[R] Type III ANOVA of package car depends on factor level order

2008-11-17 Thread Xiaoxu LI
## Question1: How to define IV with interaction alone, without main effects? ## Question2: Should Type III ANOVA in package car be independent of the factor level order? ## data from http://www.otago.ac.nz/sas/stat/chap30/sect52.htm drug <- c(t(t(rep(1,3)))%*%t(1:4)); disease <- c(t(t(1:3)) %*% t

[R] confint.glm(...) fails for binomial count data format

2008-11-16 Thread Xiaoxu LI
##Q1. confint.glm(...) fails for an example of HSAUR data("womensrole", package = "HSAUR"); ## summary(womensrole); womensrole_glm_2 <- glm(fm2, data = womensrole,family = binomial()) ## summary(womensrole_glm_2); confint(womensrole_glm_2); ## ---Fail- # Waiting for profiling to be don

Re: [R] Save a function existing library

2008-10-30 Thread Xiaoxu LI
You can choose to save your function in the file ..\etc\Rprofile.site Xiaoxu On Fri, Oct 31, 2008 at 1:45 AM, Douglas M. Hultstrand <[EMAIL PROTECTED]> wrote: > Hello all, > > I am fairly new to R and I have created a function that I use quit > frequently. I was wondering if there is away to sav

[R] How to embed residual dot plots of BHH2::anovaPlot(...) into plotMeans(...)?

2008-10-24 Thread Xiaoxu LI
Dear R fans, I am preparing a lecture discussing the paper of Wilkinson and APA Task Force on Statistical Inference (1999, American Psychologist, 54, 594-604.) I'd like to demo their Figure 3B (p. 602) with R. That is to add plotMeans(...) with dots of BHH2::dotPlot(...) . Is there any elegant scr

Re: [R] Computational problems in R

2008-10-24 Thread Xiaoxu LI
I think you should try one X for A/X=sum(exp(c_i/d -log(X))) The optional X could be as the following ... ## to test ### C = c(c_i/d; i=1,2,...,n) n<-1000; C<-runif(n,700,1000); # M<-1;while (2*M < Inf) M<-2*M; X<- exp(max(C) - log (M/n)); cat('A=',sum(exp(C-log(X))),'*',X)

Re: [R] Dream of a wiki GUI for R

2008-10-23 Thread Xiaoxu LI
I should have read the following page on R_Extension_for_MediaWiki http://mars.wiwi.hu-berlin.de/mediawiki/sk/index.php/R_Extension_for_MediaWiki_v0.06#New_tags_and_attributes Has anybody seen an ... online example page in English? I really wish wiki.r-project.org be equipped with parameter input