similar to: lda from MASS function

Displaying 20 results from an estimated 100 matches similar to: "lda from MASS function"

2008 Dec 11
2
call lattice function in a function passing "groups" argument
I'm trying to use a lattice function within a function and have problems passing the "groups" argument properly. Let's say I have a data frame d <- data.frame(x = rnorm(100), y = c("a", "b")) and want to plot variable x in a densityplot, grouped by the variable y, then I would do something like densityplot(~ x, d, groups = y) If however I wanted to
2004 Mar 19
2
using "unstack" inside my function: that old scope problem again
I've been reading the R mail archives and I've found a lot of messages with this same kind of problem, but I can't understand the answers. Can one of you try to explain this to me? Here's my example. Given a regression model and a variable, I want to use unstack() on the vector of residuals and make some magic with the result. But unstack hates me. PCSE <- function
2004 Oct 12
1
lm#contrasts#one level in factor: bug or feature
(R.1.9.1; win2000) Since it's about the tenth time I had to write an "if" around this to catch the error ... Let's look at the line myfit<-lm(res~groupvar,data=Data) Here res is of numeric type and groupvar is a factor. On first sight, it would be logical that if groupvar had only one (single) level we would get: Error in "contrasts<-"(`*tmp*`, value =
2008 May 23
3
Percentages for categorical data by group
I can think of several ways to blunt force hard code what I want but I imagine there is a command or two that can be easily combined to do this: I have a data frame with about 23000 observations. There first variable is the group to which the observation belongs (about 500 different groups). The second variable is a response for each observation that is a 1,2,3,4 or 5. I want to be able to
2012 Jan 01
1
How to pass in a list of variables as an argument to a function?
Hello, I have some code that currently works fine and I am endeavoring to convert the major pieces of it into functions. This involves taking "hard coded" names of variables that are used in various places and figuring out how to abstract them out into functions where the arguments (i.e. a list of variables)?can be passed to the parent function and used within that function for various
2010 Feb 18
2
Extract p-value from aftreg object
Dear all, does anyone know how I can extract specific p-values for covariates from an aftreg object? After fitting a model with aftreg I can find all different variables by using str(), but there's no place where p-values are kept. The odd thing is that print() displays them correctly. EXAMPLE: > testdata start stop censor groupvar var1 var2 1 0 1 0
2012 Mar 12
2
Replicating Stata's xtreg clustered SEs in R
I'm trying to replicate a time-series cross-sectional analysis (countries over years) with SEs clustered by country. ?The original analysis was done in Stata 10 with: xtreg [DV] [IVs] fe cluster(country). Using plm() in R (cran.r-project.org/web/packages/plm/index.html), I've replicated the coefficients. I sought to estimate country-clustered SEs with vcovHC(), and tried a variety of
2010 Feb 12
2
Access dataframe with variable name in function
Sorry guys, but I have another one: I want to write a function that returns a certain column of a dataframe. The function accepts two argument: the dataframe and the name of the column, but the column is not given as a "string" but as a variable name. EXAMPLE ---------------------- > testdata start stop censor groupvar var1 var2 1 0 1 0 1
2010 Feb 05
3
AFTREG with ID argument
Dear all, I have some trouble using the "id"-argument with aftreg (accelerated failure time regression analysis from the eha library). As far as I understand it, the id argument is used to group individuals together if there are time-varying covariates and the data is arranged in counting process style. Unfortunately, i cannot figure out how to use the "id"-argument. The
2010 Feb 19
1
eha aftreg performance
G?ran, thanks for the update, I'm just about to install it! Just wanted to drop you a short line about performance (as you once requested): aftreg takes ages on my windows machine to calculate a small set of 7 observations which are not even grouped together by "id". To be a bit more precise, it takes 2:40 mins on my Intel T9300 Core2 Duo @ 2.5 GHz. Bigger samples with about 700
2011 May 05
4
Using functions/loops for repetitive commands
I still need to do some repetitive statistical analysis on some outcomes from a dataset. Take the following as an example; id sex hiv age famsize bmi resprate 1 M Pos 23 2 16 15 2 F Neg 24 5 18 14 3 F Pos 56 14 23 24 4 F Pos 67 3 33 31 5 M Neg 34 2 21 23 I want to know if there are statistically detectable differences in all of the continuous variables in
2008 Mar 26
2
ggplot2 argument handling odd
Hello there, I'm trying to do lots of plots in one for-loop. But somehow ggplot does not evaluate arguments as expected. Here is an example: library(lattice) library(ggplot2) pl <- list() pl2 <- list() cDat <- as.data.frame(cbind(x1=0:100,x2=0:10,x3=1:20)) for(obs in c("x1", "x2")) { pl[[obs]] <- xyplot(cDat[,obs] ~ cDat[,"x3"], main=obs)
2002 Apr 16
6
Classification Analysis
Hi everyone, Could somebody explain to me what is the package/function for classification analysis. I am performing analysis of music files in the form of MIDI files. I end up with about 750 dependent variables from the analysis, I also have a number of independent/grouping variables that I set manually. What I would like is to be able to predict which group a particular MIDI files belongs to
2012 May 30
2
Strange Dovecot 2.0.20 auth chokes and cores
When we upgrade our kernels from 2.6.32.2 to 3.2.16 something strange has happened. On high traffic dovecot/auth looks like not responding. We found a lot of this lines at the log: dovecot: pop3-login: Error: net_connect_unix(pop3) failed: Resource temporarily unavailable (...) and clients stop authorizing Some other errors follow in the wake of: dovecot: pop3: Error: Raw backtrace:
2017 Jul 18
2
2.2.devel (0bee280) crashdump virtual plugin
#0 0x00007f497ecdb067 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 resultvar = 0 pid = 10092 selftid = 10092 #1 0x00007f497ecdc448 in __GI_abort () at abort.c:89 save_stage = 2 act = {__sigaction_handler = {sa_handler = 0xfffe, sa_sigaction = 0xfffe}, sa_mask = {__val = {1024, 140722499998576, 94791001010256, 513,
2020 Mar 03
6
Upgrade 4.9 -> 4.11 oups
Hello ! I decided to upgrade my fileservers from stretch/samba 4.9 to buster/samba 4.11 I just realized that smbd is not working anymore :-/ If someone has an idea It would be amazing... as an idiot, I upgraded my 20 servers.... without snapshot.... Thank you so much Here's some logs : root at ef113:~# tail /var/log/samba/log.smbd #1
2012 Apr 19
4
Column(row)wise minimum and maximum
Hi, Currently, the "base" has colSums, colMeans. It seems that it would be useful to extend this to also include colMin, colMax (of course, rowMin and rowMax, as well) in order to facilitate faster computations for large vectors (compared to using apply). Has this been considered before? Please forgive me if this has already been discussed before. Thanks, Ravi Ravi Varadhan, Ph.D.
2018 Mar 05
3
Coredump: Panic: file smtp-address.c: line 530 (smtp_address_write): assertion failed: (smtp_char_is_qpair(*p))
Got a coredump: Mar 5 15:09:42 mail-cbf dovecot: lmtp(backup at backup.invalid)<15425><2B+kCaZPnVpBPAAAplP5LA>: Fatal: master: service(lmtp): child 15425 killed with signal 6 (core dumped) #0 0x00007fea19977428 in __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 resultvar = 0 pid = 15425 selftid = 15425 #1 0x00007fea1997902a in
2012 May 10
2
dovecot/auth killed with signal 6
I've had this working for over a month now with no problems. Then I suffered a power outage today, and now dovecot/auth dies as soon as I start dovecot. I've spent the past three hours searching google, but can't find even a hint at what's wrong with my server. As far as I can tell, this is the only thing that has failed after bringing the server back up when power was restored.
2010 Oct 06
1
2.0.5: doveadm reload results in dovecot/auth crashing
It's not THAT bad, but: GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was