experimental-design

Calculate D-efficiency of an experimental desgin in R

生来就可爱ヽ(ⅴ<●) 提交于 2020-04-11 11:52:09
问题 I have an experimental design. I want to calculate its D-efficiency. I thought R package AlgDesign could help. I found function optFederov which generates the design and - if the user wants - returns its D efficiency. However, I don't want to use optFederov to generate the design - I already have my design! I tried eval.design(~.,mydesign). But the only metrics it gives me are: determinant, A, diagonality, and gmean.variances. Maybe there is a way to get from determinant or A to D-efficiency

Randomly reassign participants to groups such that participants originally from same group don't end up in same group

若如初见. 提交于 2020-01-15 10:23:01
问题 I'm basically trying to do this Monte Carlo kind of analysis where I randomly reassign the participants in my experiment to new groups, and then reanalyze the data given the random new groups. So here's what I want to do: Participants are originally grouped into eight groups of four participants each. I want to randomly reassign each participant to a new group, but I don't want any participants to end up in a new group with another participant from their same original group . Here is how far

Randomly reassign participants to groups such that participants originally from same group don't end up in same group

巧了我就是萌 提交于 2020-01-15 10:21:14
问题 I'm basically trying to do this Monte Carlo kind of analysis where I randomly reassign the participants in my experiment to new groups, and then reanalyze the data given the random new groups. So here's what I want to do: Participants are originally grouped into eight groups of four participants each. I want to randomly reassign each participant to a new group, but I don't want any participants to end up in a new group with another participant from their same original group . Here is how far

How to use table loader in ztree?

家住魔仙堡 提交于 2019-12-24 21:00:45
问题 I am programming a so-called "Alien Game" based on Billinger, Stieglitz and Schumacher in ztree. However, I am struggling to my NK matrix into ztree. Does anyone have experience with the "table loader" function in ztree and can help me understand how I need to transform my excel/txt sheet and/or what the command is? Thanks in advance already! 回答1: The table loader essentially loads a text file. Things to remember: First column corresponds to the table name you'd like to import to First row

Error in vcov.default(mod) : there is no vcov() method for models of class list (changing from type I to type III Sum of Squares)

◇◆丶佛笑我妖孽 提交于 2019-12-24 19:16:47
问题 I am trying to get an ANOVA table for my split-split plot design where it will use type III Sum sq instead of type I. This is what I have done so far; > Attach(Data) > library(car) > options(contrasts = c("contr.sum", "contr.poly")) > mod <- aov(Response ~ A*B*C + Error(Block/A/B/C)) > Anova(mod, type='III') Error in vcov.default(mod) : there is no vcov() method for models of class aovlist, listof I don't understand why I keep getting this error message, or what to do about it. Any help

unique values of rows

穿精又带淫゛_ 提交于 2019-12-13 19:07:57
问题 I often encounter data that looks like this: #create dummy data frame data <- as.data.frame(diag(4)) data[data==0] <- NA data[2,2] <- NA data #V1 V2 V3 V4 #1 1 NA NA NA #2 NA NA NA NA #3 NA NA 1 NA #4 NA NA NA 1 Rows represent participants and columns V1 through V4 represent the condition that the participant is in (e.g., a 1 under V1 means this participant is in condition 1, a 1 under V4 means this participant is in condition 4). Sidenote: The data are not symmetric, so there are a lot more

python pandas: assign control vs. treatment groupings randomly based on %

你。 提交于 2019-12-13 17:53:29
问题 I am working on an experiment design, where I need to split a dataframe df into a control and treatment group by % by pre-existing groupings. This is the dataframe df: df.head() customer_id | Group | many other columns ABC 1 CDE 1 BHF 2 NID 1 WKL 2 SDI 2 pd.pivot_table(df,index=['Group'],values=["customer_id"],aggfunc=lambda x: len(x.unique())) Group 1 : 55394 Group 2 : 34889 Now I need to add a column labeled "Flag" into the df. For Group 1, I want to randomly assign 50% "Control" and 50%

Randomly Assign Integers in R within groups without replacement

懵懂的女人 提交于 2019-12-12 01:18:13
问题 I am running an experiment with two experiments: experiment_1 and experiment_2. Each experiment has 5 different treatments (i.e. 1, 2, 3, 4, 5). We are trying to randomly assign the treatments within groups. We would like to do this via sampling without replacement iteratively within each group. We want to do this to insure that we get as a balanced a sample as possible in the treatment (e.g. we don't want to end up with 4 subjects in group 1 getting assigned to treatment 2 and no one getting

Two fixed factors nested and crossed factors in R

杀马特。学长 韩版系。学妹 提交于 2019-12-11 03:47:45
问题 I want to design a nested model. It is kind of difficult to explain so I drew a picture. All of the factors are fixed and there are 2 levels (0, 1) in each of them. A and B have nested factors C and D. E and F are independent with these guys and are crossed all over. I would like to know the interactions between them. I know that I can do this in R, for one nested factor: out <- lm(Y ~ A + A/B) But how can I do it when there are several nested factors, and there are other independent factors?

How to experimentally determine the scheduling quantum of a process/thread?

空扰寡人 提交于 2019-12-07 13:40:12
问题 Just to head off any comments to the effect of "why do you need to know this??": This is just a puzzle I was curious about, not something I need to do for any practical reason. Given a typical POSIX system[1], how would you design an experiment to determine the scheduling quantum[2] of a CPU-bound process? [1]: but NOT one that lets you query for this information through a syscall or /proc interface [2]: "Scheduling quantum" is defined as the amount of time a process will run on the CPU