search for: ndat

Displaying 13 results from an estimated 13 matches for "ndat".

Did you mean: dat
2011 Oct 19
1
hypothetical prediction after polr
Dear R-Help listers, I am trying to estimate an proportional odds logistic regression model (or ordered logistic regression) and then make predictions by supplying a hypothetical x vector. However, somehow this does not work. I guess I must have missed something here. I first used the polr function in the MASS package, and I create a data frame and supply it to the predict function (see below):
2013 Jun 19
1
nls singular gradient ..as always..
...e following code to fit an exponential model to my data. I have 4 different datasets. For 3 datasets nls seems to work fine and I have no error messages. But for 1 dataset I am getting the "world known" singular gradient error. xfit.dNEE <- nls(vario.dNEE~V*(1-exp(-1*dist/L)),data=ndat,start=list(V=vstart,L=lstart),trace=T) I tried also with different starting values but still the same error... Any help would be highly welcome. Thank you in advance. -- View this message in context: http://r.789695.n4.nabble.com/nls-singular-gradient-as-always-tp4669859.html Sent from th...
2016 Apr 05
1
Heatmap Colnames
....82,-3.02,0.99,1.1,-3.31))) rownames(dat)=c("hsa-miR-200c","hsa-miR-520b","hsa-miR-199a-3p","mmu-miR-124a","hsa-miR-302a","hsa-miR-454","mmu-miR-137") colnames(dat)=c("24", "72") heatmap.3(dat, srtCol=70) ndat<-as.matrix(dat) heatmap.3(ndat, Rowv=FALSE, Colv=FALSE)
2007 Jun 16
1
mardia's test
In the R code of Mardia's test, what does the line " x1 = x[x[, p] == i, -p]" mean? Thanks a lot! function (x) { p = dim(x)[2] f = p - 1 clases = length(table(x[, p])) for (i in 1:clases) { x1 = x[x[, p] == i, -p] ndat = dim(x1)[1] mo3 = mo3(x1) mard1 = ndat * mo3/6 cat("Mardia's test for class", i, "\n") cat("mard1=", mard1, "\n") p1 = 1 - pchisq(mard1, df = f * (f + 1) * (f + 2)/6) cat("pvalue for m3=", p1, &qu...
2005 Aug 08
1
bug found in predict.locfit in locfit package (PR#8057)
...9, 1.310990, 2.043032, 0.449906,-0.951917,-0.077104, -0.356833,-0.286042, 0.065750, 0.159677,-0.075792) x2=c(-0.3050, 1.0125, 0.2050, 0.1025, 0.9550, 0.6975, 1.5550, 0.0225, 0.2575, 0.3725, 2.0075, 2.1275, 0.7200, 0.2950, 0.2875, -0.2800,-0.6050, 0.2125,-0.5525,-1.7850) ndat=length(y) ybk=y x1bk=x1 x2bk=x2 ######## Joint probability function of y, x1 and x2 # fit joint probability function fityxv=locfit(~y+x1+x2,alpha=1,deg=1) fyxv=predict(fityxv,where="data") ######## Marginal distribution of gxv # fit marginal distribution of y fitxv=locfit(~x1+x2,alpha=0....
2003 Dec 11
1
packaging standards for rda files?
Dear everybody: We used the fine foreign library to bring in an SPSS dataset that was about 9 megabytes and I can squeeze it into a much smaller R object using compression with save(ndat, file="NatAnnES2000.rda", compress=T). I can use load() to get the "ndat" dataframe back, that's all good as far as I can see. If I put that file in the data subdirectory, then the data() command finds it and I can load it. Seems fine, but then I started wondering if...
2005 Oct 05
0
bug found in predict.locfit in locfit package ( PR#8057)
...06,-0.951917,-0.077104, > -0.356833,-0.286042, 0.065750, 0.159677,-0.075792) > x2=c(-0.3050, 1.0125, 0.2050, 0.1025, 0.9550, > 0.6975, 1.5550, 0.0225, 0.2575, 0.3725, > 2.0075, 2.1275, 0.7200, 0.2950, 0.2875, > -0.2800,-0.6050, 0.2125,-0.5525,-1.7850) > > ndat=length(y) > ybk=y > x1bk=x1 > x2bk=x2 > ######## Joint probability function of y, x1 and x2 > # fit joint probability function > fityxv=locfit(~y+x1+x2,alpha=1,deg=1) > fyxv=predict(fityxv,where="data") > > ######## Marginal distribution of gxv > # fit margi...
2011 May 11
3
Vermunt's LEM in R
....table does pretty much what you want, [not tested] newtab <- as.data.frame(table(a,b,c)) cat("dim\n") for(i in seq(1, ncol(newtab)-1) { cat(nlevels(newtab[,1]," ") } cat("\nlab ") for(i in seq(1, ncol(newtab)-1) { cat(letters[i], " ") } cat("\ndat [", newtab[,"Freq"], " ]\n") -- | David Duffy (MBBS PhD) ,-_|\ | email: davidD at qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, B...
2010 Jun 07
2
mgcv
Hello Sir, I am using mgcv package for my data. My model is y~x1+f(x2),I want to find out the function f(x2) . Following is the code.   sm1=gam(y~x1+s(x2),family=binomial, f) summary(sm1) plot(sm1,residuals=TRUE, xlab="AGE",pch=20)   In this plot I am getting S(x2,1.93) on y axixs  How should I get the function for x2 from this plot.or Is there anyother procedure in R  to get this
2012 Jul 25
3
creating Pivot
Hi Friends, I'm new to R.I have a data frame : xxx having columns color name values R XXX 10 G YYY 4 Y ZZZ 5 G XXX 2
2008 Oct 23
0
error when using logistic.display within a loop
...logreg1<-vector("list", length(l)) logreg.anov1<-vector("list",length(l)) logreg.summ1<-vector("list",length(l)) logreg.conf1<-vector("list",length(l)) for (i in c(13:16)){ logreg1[[i-x]]<-glm(dat[,i]~group + age, family=binomial, data=Ndat) logreg.anov1[[i-x]]<-anova(logreg1[[i-x]]) logreg.summ1[[i-x]]<-summary(logreg1[[i-x]]) logreg.conf1[[i-x]]<-logistic.display(logreg1[[i-x]], crude=FALSE) } --------------------------------- Går det långsamt? Skaffa dig en snabbare bredbandsuppkoppling. Sök och...
2010 Feb 09
1
question about nlme...
...een able to locate any code. Below is my attempt at some code: chgpt = function(a1,a2,a3,gam,wave){ yht=numeric(10) y1=(wave <= gam)*(a1+(a2*wave)) y2=(wave > gam)*((a1+(a2-a3)*gam)+a3*wave) yhat=y1+y2 return(yht) } nl.dat <- nlme(y ~ chgpt(a1,a2,a3,gam,wave)~wave|id, data = ndat, fixed = a1 + a2 + a3 + gam, random = a1 + a2 + a3, start = c(a1=10,a2=5,a3=1,gam=4.5)) summary(n1.dat) I would appreciate any advice on this code or guidance as to where to search for example code to fit this nonlinear mixed effects model. Many thanks, Jeff H...
2013 Feb 21
0
Odd Error message with rare events logit
...igure out. y = rnorm(100) x = c(rep("0",1), rep("1",99)) d = data.frame(won=x, bid=y) d mod1 <- zelig(y~x, model="relogit", data=d, tau=1/100, case.correct="prior", bias.correct=TRUE, robust=TRUE) > mod1 <- zelig(y~x, model="relogit", data=ndat, tau=1/100, case.correct="prior", bias.correct=TRUE, robust=TRUE) <simpleError in family$linkfun(mustart): Value 1.16885 out of range (0, 1)> Error in eval(expr, envir, enclos) : object 'form' not found In addition: Warning messages: 1: In model.matrix.default(mt, mf, contra...