Displaying 20 results from an estimated 43 matches for "mdata".
Did you mean:
data
2005 Mar 18
2
logistic model cross validation resolved
...<- function(formula, family, data){
ret <- glm(formula, family=binomial, data=data)
return(ret)
}
myfacpred <- function(object, newdata) {
ret <- as.factor(ifelse(predict.glm(object, newdata, type='response') < 0.5, 0, 1))
return(ret)
}
# logerrorest takes four arguments
# mdata is a data frame holding the data to be modeled
# form is the output of the is.formula function
# rvar is the response variable as a string, for example 'birdx'
# fvar is the fold variable, for example 'recordyear'
logerrorest <- function(mdata, form, rvar, fvar) {
require(Hmisc)...
2004 Mar 23
1
nlme question
...<-
function(dat=v) {
test<-nlsList(result~a+(b-a)/(1+(conc/(c+z*cdiff))^d)
|rep,start=dat$init,data=dat$mixeddat)
return(nlme(test,random=b~1))
}
Here, v is an appropriate data frame in the main workspace.
Inserting two lines in nlme.nlsList will fix it:
Replacing line 21 from bottom "mData<-eval(mData) " by " mData <-
eval(mData,parent.frame())"
Inserting thisCall[["data"]]<-mData on line 4 from bottom before val
<- do.call("nlme.formula", thisCall)
Doing this makes nlme.nlsList recognize the input data of the regression.
But is...
2005 Mar 17
1
Cross validation, one more time (hopefully the last)
....data, form, 'basp', 'recordyear')
Error in order(na.last, decreasing, ...) :
Argument 1 is not a vector
My questions are, why doesn't this work, and how do I fix it.
I'm using the formula function to create the formula that I'm sending to my function. And the mdata is a data.frame. I'm assumed that if I passed the column names as strings (response variable - rvar, fold variable - fvar) this would work. Apparently however it doesn't.
Lastly, since I don't have access to MASS and there are apparently many examples of doing this kind of thing in MAS...
2013 Feb 27
1
metafor - interpretion of QM in mixed-effects model with factor moderator
...st whether the effect is different for animals and plants/whether "group"
(animal/plant) influences the effect size, but am having trouble
interpreting the results I get. I've read previous posts about QM in
metafor, but I'm still a bit confused. I've dummy-coded the factors:
MData$k.animal<-ifelse(MData$Type=="Animal",1,0)MData$k.plant<-ifelse(MData$Type=="Plant",
1,0)
I've then run the model with the following script:
MixModel<-rma(z, v.z., mods=cbind(k.animal, k.plant), intercept=FALSE,
data=MData, subset=(Response=="Tolerance"...
2009 Mar 08
3
xyplot() - can you control how the plots are ordered?
...# months
months <- c("Jan", "Feb", "Mar",
"Apr", "May", "Jun",
"Jul", "Aug", "Sep",
"Oct", "Nov", "Dec");
n <- length(months);
m <- 10;
mdata <- data.frame(x = runif(m*n), y = runif(m*n), z = rep(months,
each = m));
h <- xyplot(y ~ x | z, data = mdata);
plot(h);
#-------------------------------------------------------------
The output of the xyplot() is sorted by the alphabetical order of
months (First Apr, then Aug so on). I need...
2010 Aug 13
1
mlogit error
...r:
Error in `row.names<-.data.frame`(`*tmp*`, value = c("NA.NA", "NA.NA", :
duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique value when setting 'row.names': ‘NA.NA’
My code:
> flevel1$Q120<-as.factor(flevel1$Q120)
> MData<-mlogit.data(flevel1, varying=NULL,choice="Q120", shape="wide")
> LogitModel<-mlogit(flevel1$Q120~1|flevel1$Q92, data=MData)
MData[1:10,]
Q56 Q92 Q102 Q119 Q120
1.1 10 7 10 10 FALSE
1.10 10 7 10 10 TRUE
1.2 10 7 10 10 FALSE
1.3 10 7...
2011 Aug 15
3
Plot from function
*I have the following function:*
/plot_mi_time = function(mdata, miname) {
mdata2 = mdata[row.names(hakat) == miname, ]
print(mdata2)
xcoords <- c(1,1,2,2,3,3,4,4,5,5,6,6)
plot(c(xcoords), mdata2, xaxt="n", ylab="Expression", xlab="Time(h)", ,
main=miname)
axis(1, at=xcoords,
labels=c("a","a",...
2011 Oct 26
2
Help with a scatter plot
Hi everyone,
I have some data about a market research which I want to arrange in one plot
for easy viewing,
the data looks something like:
Product Color StoreA StoreB StoreC StoreD Price
ProdA R NA 4.33 2 4.33 35
G NA 4.33 2 4.33
35
B
2011 Jun 01
2
re-write plot function for ggplot
Hi, I have the following function that i use to plot graphs.
plot_mi_time = function(mdata, miname) {
mdata2 = mdata[row.names(mir_test3) == miname, ]
# print(mdata2)
xcoords <- c(1,1,2,2,3,3)
plot(xcoords, mdata2, xaxt="n", ylab="Expression", xlab="Time(h)", ,
main=miname)
axis(1, at=xcoords, labels=c("a","a","b&q...
2012 Jun 27
0
ggplot2 ordering in a faceted dotplot.
...,
absent2001 = c(11.6, 12.8, 10.1, 9.2, 9.4, 8.1, 8.7, 8.5,
8.6, 8.6, 7.8, 7.5, 8.5, 8.5, 8, 6.3, 7.5, 7.3, 7.3, 8.5,
7.9, 8.5, 9, 6.2, 6.5, 5.1)), .Names = c("group", "absent2011",
"absent2001"), class = "data.frame", row.names = c(NA, -26L))
mdata <- structure(list(group = structure(c(7L, 10L, 24L, 19L, 12L, 3L,
14L, 22L, 6L, 13L, 8L, 11L, 5L, 17L, 21L, 20L, 23L, 2L, 1L, 4L,
25L, 9L, 15L, 26L, 16L, 18L), .Label = c(" Accommodation and food services",
"Agriculture ", " Business, building & other support se...
2011 Apr 08
1
Is function compiled code or not?
Hi,
Sorry for my ignorance, but how can I see if a function is 'compiled code' or plain R? E.g. the daisy
function from the cluster package.
2010 Jan 28
2
NA Replacement by lowest value?
...alues to a small value, close to zero
{
min.val = min(col[col > 0])
col[col < 0] = (min.val / 10)
col # Column index
}))
I think this is how to start, but the NA replacement part doesn't work...
newMatrix = as.matrix(apply(oldMatrix, 2, function(col)
{
min.val = min(mData, na.rm = T) # Find the smallest value in the dataset
col[col == NA] = (min.val / 10) # Doesn't work...
col # Column index
}
Does any of you have any suggestions?
Best regards,
Joel
_________________________________________________________________
Hitta kär...
2012 Sep 30
0
Speex (in ios) really poor quality (and robotic) sound
...// Allocate our own buffers (1 channel, 16 bits per sample, thus 16 bits per frame, thus 2 bytes per frame).
// Practice learns the buffers used contain 512 frames, if this changes it will be fixed in processAudio.
tempBuffer.mNumberChannels = 1;
tempBuffer.mDataByteSize = FRAME_SIZE * 2;
tempBuffer.mData = malloc( FRAME_SIZE * 2 );
XThrowIfError(AudioSessionSetActive(true), "couldn't set audio session active\n");
// Initialise
status = AudioUnitInitialize(rioUnit);...
2024 Jun 26
1
Confusion supreme
...00000000000000000000
trusted.afr.gv0-client-1=0x000000000000000000002394
trusted.afr.gv0-client-2=0x0000000000000000000000a0
trusted.afr.gv0-client-4=0x00000001000000000000001a
trusted.gfid=0xbf3ed8b7b2a8457d88f19482ae1ce73d
trusted.glusterfs.dht=0x000000000000000000000000ffffffff
trusted.glusterfs.mdata=0x010000000000000000520318006fbb5600000000001c00ba4800000000667c1663000000002e7f0c84a2925c3455bf9e00000000001098f13e
HostB
# getfattr -d -m . -e hex /vol/gfs/gv0/net/provocation/oracle/Maildir/cur
getfattr: Removing leading '/' from absolute path names
# file: vol/gfs/gv0/net/provocation/o...
2012 Jun 28
6
Help
Dear all,
I need some help on plotting multiple boxplots on one figure.
I have three matrix A, B and C. Each of them is a 1000 by 10 matrix.
The 10 columns of all three matrix correspond to the
10 values of the same parameter, say k=1, ..., 10.
I want to make a plot where x axis represents different values of k.
For each k value, I want to plot three boxplots, one on top of another.
For
2009 Dec 02
5
Inquiry:How to compare two files but not in line-by-line basis?
Dear All
Can you please do me favor and let me know how can I compare two files but
not in line-by-line basis on my CentOS server ? I mean say row#1 in file1
has the same data as say row#5 in file2 , but the comm compares them in
line-by-line basis that is not intended . It seems that the diff cannot do
the job as well .
Thank you in advance
-------------- next part --------------
An HTML
2023 Nov 06
1
strange link files
...y, I know that glusterfs creates link files (size zero and sticky bit set) when the new filename is hashed to a different brick. However, these link files are only visible to the glusterfsd, not to the users.
I also noted that now the "link files" have an additional attibute (glusterfs.mdata) and previously link files stored the "real" brick name in "glusterfs.dht.linkto".
Therefore, I have a two of questions:
1) Is this a bug, or is it intentionally that glusterfs 10 clients don't work with glusterfs 9 servers?
2) If it's not a bug, how does the attrib...
2011 May 31
0
Plot duplicate csv columns
I am using the following function to plot columns from a CSV-file:
plot_mi_time = function(mdata, miname) {
mdata2 = mdata[row.names(mir_test) == miname, ]
# print(mdata2)
plot(c(1:3), mdata2, xaxt="n", ylab="Expression", xlab="Time(h)", ,
main=miname, pch=16)
axis(1, at=c(1,2,3),labels=c("a","b","c"))
}
No I have a CSV f...
2012 Jun 05
0
propensity score matching estimates?
...atching with replacement (the "M=1" option).
# Estimating the treatment effect on the treated (the "estimand" option
defaults to ATT).
rr <- Match(Y=Y, Tr=Tr, X=X, M=1);*
And here's where the 'problem' occurs:
*summary(rr) # gives an estimate of 2153.3
mean(rr$mdata$Y[rr$index.treated])-mean(rr$mdata$Y[rr$index.control]) #
gives an estimate of 1083.848
*
Notice that when I simply subtract the means from one another, I get a
different estimate (1083.848) than when the algorithm outputs (2153.3). It
seems that the obvious answer is that I'm not computing th...
2004 May 28
6
distance in the function kmeans
Hi,
I want to know which distance is using in the function kmeans
and if we can change this distance.
Indeed, in the function pam, we can put a distance matrix in
parameter (by the line "pam<-pam(dist(matrixdata),k=7)" ) but
we can't do it in the function kmeans, we have to put the
matrix of data directly ...
Thanks in advance,
Nicolas BOUGET