search for: gendata

Displaying 20 results from an estimated 32 matches for "gendata".

2008 Dec 26
3
Simulating dataset using Parallel Latent CTT model?
...dataset using Parallel Latent CTT model and this is what i have done so far: (START) #Importing psych library for all the simulation related functions library(psych) # Settting the working directory path to C:/NCME path="C:/NCME" setwd(path) #Using the function to generate the data GenData <- congeneric.sim(N=500, loads = c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1), short = FALSE) #Rounding upto 2 decimal places while showing the correlation matrix round(cor(GenData$observed),2) #Factor Score FactorScore=factor.pa(GenData$observed,1,scores = "TRUE", rotate="none&q...
2009 Jan 28
1
stack data sets
...ams, ncol=n.items) str(Observed_Scores) for (k in 1:10) { #Setting the starting point for seed set.seed(k) #filling item parameters into beta.values beta.values = runif(n.items,-2,2) #Calculating Threshold thresh.values = .5 * beta.values #Using the function to generate the Parallel Model CTT data GenData <- congeneric.sim(N=500, loads = rep(.5,20), err=NULL, short = FALSE) #Storing Observed Score in a variable Observed_Scores = GenData[[3]] #Exporting Observed scores to output file ObservedScores_Data <- paste("Observed_Scores_",k,".dat") write.table(Observed_Scores,Obser...
2009 Jan 10
2
Print specific matrix value???
...ow=n.exams,ncol=n.items) Observed_Scores = matrix(rep(NA,n.exams*n.items),nrow=n.exams,ncol=n.items) #filling item parameters into beta.values beta.values = runif(n.items,-2,2) #Calculating Threshold thresh.values = .5 * beta.values #for (i in 1:10) #{ #Using the function to generate the data GenData <- congeneric.sim(N=500, loads = rep(.5,20), err=NULL, short = FALSE) Observed_Scores = GenData[1] Regards Nidhi Kohli
2009 Jan 28
0
How to stack data sets?
...ams, ncol=n.items) str(Observed_Scores) for (k in 1:10) { #Setting the starting point for seed set.seed(k) #filling item parameters into beta.values beta.values = runif(n.items,-2,2) #Calculating Threshold thresh.values = .5 * beta.values #Using the function to generate the Parallel Model CTT data GenData <- congeneric.sim(N=500, loads = rep(.5,20), err=NULL, short = FALSE) #Storing Observed Score in a variable Observed_Scores = GenData[[3]] #Exporting Observed scores to output file ObservedScores_Data <- paste("Observed_Scores_",k,".dat") write.table(Observed_Scores,Obser...
2005 Jul 04
2
Lack of independence in anova()
...action and row effects be independent. In my program, appended below, this would translate to cntT (approx)= cntR*cntI/N if all R routines were functioning correctly. They aren't. sim2=function(size,N,p){ cntR=0 cntC=0 cntI=0 cntT=0 cntP=0 for(i in 1:N){ #generate data v=gendata(size) #analyze after build(ing) design containing data lm.out=lm(yield~c*r,build(size,v)) av.out=anova(lm.out) #if column effect is significant, increment cntC if (av.out[[5]][1]<=p)cntC=cntC+1 #if row effect is significant, increment cntR if (av.out[[5]][2]<=p)...
2010 Feb 24
0
New version of rms package now on CRAN
Version 2.2-0 of the rms package is now available. This is a somewhat major update. One major change is not downward compatible: Instead of specifying predictor=. or predictor=NA to Predict, summary, nomogram, survplot, gendata, you just specify the name of the predictor. For example, to get predictions for the default range of x1 and for just 2 values of x2 you might specify Predict(fit, x1, x2=c(1,3)). The next major change is the use of lattice graphics in bplot, so that now you can easily make multi-panel 3-D di...
2010 Feb 24
0
New version of rms package now on CRAN
Version 2.2-0 of the rms package is now available. This is a somewhat major update. One major change is not downward compatible: Instead of specifying predictor=. or predictor=NA to Predict, summary, nomogram, survplot, gendata, you just specify the name of the predictor. For example, to get predictions for the default range of x1 and for just 2 values of x2 you might specify Predict(fit, x1, x2=c(1,3)). The next major change is the use of lattice graphics in bplot, so that now you can easily make multi-panel 3-D di...
2011 Nov 03
2
Create design matrix
Greetings useRs, What is the easiest way to create a design matrix of several factor variables? Function gendata in Design seems to do that for a fitted model, but how to do that only on several factor vectors?? The result should be a df with one row for each distinct combination of levels of factors eg for (M,F) (Y,O) We get M Y M O F Y F O In reality I will have more than 1000 rows so doing by hand not go...
2007 May 03
2
Package contrast error
...1 2.39811353 Number of Observations: 291 Number of Groups: 119 > When I try to get the contrast I get one of two errors each time. Trying for a paired contrast... tst <- contrast(lme.fnl.REML, a=list(Yr=levels(Yr), Tr="R"), b=list (Yr=levels(Yr, Tr="T97"))) Error in gendata.default(fit = list(modelStruct = list(reStruct = list ( : not enough factors Trying to include the other factor to make R happy.... > tst <- contrast(lme.fnl.REML, a=list(Yr=levels(Yr), Tr="R"), b=list (Yr=levels(Yr, Tr="T97")), c=list(Yr=levels(Yr, Tr="T98&quot...
2013 Apr 11
0
plotting the cumulative hazard function of a process whose intensity function is specified
...the following code, but it has a number of problems. One issue I have is I do not know where the time variable is. I would appreciate your help with this code. library("survival") n <- 5000 lamc<-0.08 k1<-0.05 k2<-3 ld<-function(t){k1+k2} l<-function(t){k1+k2*exp(-t)} gendata<-function(n,lamc,k1,k2) { re<-rexp(5*n)/(k1+k2) ru<-runif(5*n) y<-rep(0,n) k<-1 for (i in 1:n){ u<-re[k] } while (ru[k] <l(u)/ld(u)){ k<-k+1 u<-u+re[k] y[i]<-u k<-k+1 } cen<-rexp(n,rate=lamc) } obj&lt...
2013 Apr 19
2
NAMESPACE and imports
...atex method for objects of class "anova.rms" so there are anova.rms and latex.anova.rms functions in rms. I use: export(asis,bj,bjplot,bootBCa,bootcov,bootplot,bplot,calibrate,cph,catg,combineRelatedPredictors,confplot,contrast,coxphFit,cph,cr.setup,datadist,effective.df,fastbw,formatNP,gendata,gIndex,GiniMd,Glm,Gls,groupkm,Hazard,hazard.ratio.plot,histdensity,"%ia%",ie.setup,interactions.containing,legend.nomabbrev,lm.pfit,lrm,lrtest,lsp,matinv,matrx,Newlabels,Newlevels,nomogram,num.intercepts,ols,ols.influence,oos.loglik,pantext,Penalty.matrix,Penalty.setup,pentrace,perimeter,...
2011 Aug 17
1
contrast package with interactions in gls model
...Hobonil (for same treatment among forests levels) I used function contrast (package contrast) whit following script to probe the hypotesis 1.: con<-contrast(FINAL, list(Lugar= 'Xmatkuil', Tra=1), list(Lugar='Xmatkuil', Tra = 0)) but i found this error message: Error en gendata.default(fit = list(modelStruct = list(varStruct = c(-0.253689933940456, : not enough factors I would be grateful if somebody tell me I'm doing wrong with my contrast function script. Thanks in advance, Marylin Bejarano PHd candidate in Ecology Institute of Mexico's National Autonomou...
2017 Nov 01
0
"prob" package alternative
...PTION file indicates that it does not need compilation, but: Depends: combinat, fAsianOptions So there should be code in text files in its ../R directory which can be sourced from that directory. ~myuser_name$ ls /Users/../Downloads/prob/R characteristicfunctions.r simulation.r utils-spaces.r genData.R spaces-examples.r utils-subsets.r misc.r spaces-prob.r prob.r utils-events.r Or you can install from source after downloading: install.packages("~/Downloads/prob", repo=NULL,type="source") # Success > library(prob) # So does require having several other pa...
2017 Nov 01
2
"prob" package alternative
The prob package has been archived because it depends upon some other packages which have issues. However, such projects as Introduction to Probability and Statistics in R depend upon it for learning. There are a few other resources that also use it. Does anyone know of any workarounds? Someone at stack exchange mentioned using R 2.9. However, that broke my RStudio (WSOD) and the dependent
2017 Nov 02
2
"prob" package alternative
...tion, but: > > Depends: combinat, fAsianOptions > > So there should be code in text files in its ../R directory which can be > sourced from that directory. > > ~myuser_name$ ls /Users/../Downloads/prob/R > characteristicfunctions.r simulation.r > utils-spaces.r > genData.R spaces-examples.r > utils-subsets.r > misc.r spaces-prob.r > prob.r utils-events.r > > > Or you can install from source after downloading: > > install.packages("~/Downloads/prob", repo=NULL,...
2003 Jan 06
1
replacing a w2k machine with samba 2.2.7a
...winbind gid = 10000-20000 winbind enum users = yes winbind enum groups = yes template homedir = /mnt/usersdata/_users/%U security = domain encrypt passwords = yes dos filemode = yes # security mask = 0000 [_Creative] comment = Creative division path = /mnt/gendata/_creative read only = no create mode = 664 directory mode = 775 force security mode = 664 force group = +MyOrg+Creative write list = @MyOrg+Creative all files written to the share are mode 664, and directories are 775 . There is a problem though, when an owner of the file sets...
2017 Nov 02
2
"prob" package alternative
...combinat, fAsianOptions > > > > So there should be code in text files in its ../R directory which can be > sourced from that directory. > > > > ~myuser_name$ ls /Users/../Downloads/prob/R > > characteristicfunctions.r simulation.r > utils-spaces.r > > genData.R spaces-examples.r > utils-subsets.r > > misc.r spaces-prob.r > > prob.r utils-events.r > > > > > > Or you can install from source after downloading: > > > > install.packages(&quot...
2017 Nov 02
0
"prob" package alternative
...gt; > Depends: combinat, fAsianOptions > > So there should be code in text files in its ../R directory which can be sourced from that directory. > > ~myuser_name$ ls /Users/../Downloads/prob/R > characteristicfunctions.r simulation.r utils-spaces.r > genData.R spaces-examples.r utils-subsets.r > misc.r spaces-prob.r > prob.r utils-events.r > > > Or you can install from source after downloading: > > install.packages("~/Downloads/prob",...
2009 Nov 10
0
contrast in lme
...ould lke to estimate the effect of "treatment" at time = 6 using the package "contrast" library(contrast) contrast(model.lme , a = list(tt="1",time="6"), b = list(tt="0",time="6") ) But I get the following error message "Erreur dans gendata.default(fit = list(modelStruct = list(reStruct = list( : not enough factors" I'm obviously doing something wrong. Thanks for your help. Jacques -- View this message in context: http://old.nabble.com/contrast-in-lme-tp26281409p26281409.html Sent from the R help mailing list archive a...
2007 May 14
1
Predicted values from a logistic model
Hello - I apologize if this question is simple/obvious, but I couldn't find a satisfactory answer online, and I am not very accustomed to working with R (Matlab is my poison. :-)). Any help would be greatly appreciated. I have a model with a three-level factor and a continuous covariate. The call I use is: mymodel <- glm(Response ~ Factor_covariate + continuous_covariate - 1,