+ Reply to Thread
Results 1 to 14 of 14

Thread: What model should I use? Mixed-effect model?

  1. #1
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    What model should I use? Mixed-effect model?




    Hello guys,

    I really hope you can help me with this. Any ideas/suggestions are welcome. My main goal is to create a model that predicts which staff member is more likely to use force (UOF) in a mental health center. The goal is to detect these officer and prevent them from using force.

    To conduct these analysis I collected daily data among a sample of officers and record in which days they use force (DV yes-use force 0=didn’t use force). The dataset contains characteristic of the staff (race, gender, etc) and what I call “environmental factors” such as place and time of their shift. For example a staff member can work one day in facility 1 and the next day in facility 2, or work one day in a office (where is less likely to use force) and one day as a special force unit (more likely to use force). Also there are characteristics about the time. For example, we know that there are more UOF in the summer compared to winter.

    As you can see there are many layers of effects. I have experienced working with logistic or linear simple regression models but not with this type of data. Based on some readings, this seems to be more like a multi-level mixed-effect model.

    1. What kind of analysis can I conduct with a data like this?
    2. Is this data enough or viable to conduct analysis or do I need change the data structure?
    3. Is his in fact a mixed-effect analysis? If yes, which are my levels?
    4. Is there any other way I can conduct this analysis?

    Please any comments would be greatly appreciated!

    Marvin
    Attached Files

  2. #2
    Omega Contributor
    Points: 38,303, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,993
    Thanks
    397
    Thanked 1,185 Times in 1,146 Posts

    Re: What model should I use? Mixed-effect model?

    Yeah, seems like a mixed model could be used. Level 1 officers data, Level 2 region. This seems like a difficult social science question, which may be difficult to collect all relevant or latent variables within the causal structural.
    Stop cowardice, ban guns!

  3. #3
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Re: What model should I use? Mixed-effect model?

    Hi hlSmith,

    Thank you fro your response. How would you do it? I know that this dataset is ideal but perhaps there is a more basic way to predict those staff member that are more likely to use force against a patient. How would you tackle this?

    Thank you in advance,
    MArvin

  4. #4
    TS Contributor
    Points: 12,227, Level: 72
    Level completed: 45%, Points required for next Level: 223
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,470
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: What model should I use? Mixed-effect model?

    hi,
    looking at the data I would pick a machine learning method, classification trees or rules especially that you want to predict and not to explain behaviour.

    https://cran.r-project.org/web/views...eLearning.html

    Regards

  5. #5
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Re: What model should I use? Mixed-effect model?

    Hi Rogojel,

    Can you explain little bit more. This is completely new for me.

    Best,
    Marvin

  6. #6
    TS Contributor
    Points: 12,227, Level: 72
    Level completed: 45%, Points required for next Level: 223
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,470
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: What model should I use? Mixed-effect model?

    hi,
    I mean, if you want to explain behaviour you need to have a model that is like a logistic regression, say, giving you an increase of x% in the odds by every increase of a unit in the relevant x , so that you can have a theory of why x is increasing the odds of the UOF. If you want only to predict you can have something like a classification tree that will give you possibly better prediction performance than the regression, but without giving an explanation . E.g. CRTs were used to predict loan default, and they perform pretty well, but they will not provide a detailed explanation, of WHY they predict default for a given customer. Also, trees can discover nonlinear patterns more naturally than regression.

    By looking at your data set I think you might have a better chance of predicting with these methods, provided that you have enough data.

    Regards

  7. #7
    Omega Contributor
    Points: 38,303, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,993
    Thanks
    397
    Thanked 1,185 Times in 1,146 Posts

    Re: What model should I use? Mixed-effect model?

    rogojel,

    How would you approach with multiple observations per unit?

    Marvin can you describe the outcome a little more? Each encounter has the binary outcome physicality yes or no? And person can have multiple encounters per region, etc.
    Stop cowardice, ban guns!

  8. #8
    TS Contributor
    Points: 12,227, Level: 72
    Level completed: 45%, Points required for next Level: 223
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,470
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: What model should I use? Mixed-effect model?

    hi hlsmith,
    I guess I would treat the ID as just another factor. If it turns out, that some people are more prone to UOF this will show in the analysis. For the CRT or a naive Bayes classificator the independence of observations is no requirement AFAIK so I would not bother about the observations being linked.

    Does that make sense?

    regards

  9. #9
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Re: What model should I use? Mixed-effect model?

    Thank you both! I have to read a lot about this methodology since it is the first time I heard about them. Just so you know the goal at my job (very ambitious goal) is to develop kind of a model to see which staff would be more likely to use force (perhaps in the next week or month). The final design is not finished yet so any ideas are welcome. Perhaps when the staff member knows his/her schedule for the week or maybe month, he/she will enter his information and the information about their scheduled (for example Monday I will work in facility 1 as a special unit- more likely to use force; and Tuesday I will do paper work in the office -very unlikely to use force) in the model and we will see how likely they are to use force in the week-perhaps by day. Is this possible?

    HLSmith: Yes so basically, the outcome variable is whether in that day the medical staff worked, he or she used force against an a patient. So each day is coded as UOF or no UOF. Of course. a staff member can have many incidents of UOF in different facilities. Basically we are looking at each day and record if they use force or not.

    Does Stata can do this CRT analysis? What would be a good source to learn about this model.

    Thank you,
    MArvin

  10. #10
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Re: What model should I use? Mixed-effect model?

    Anyone??
    To answer smith questions: How would you approach with multiple observations per unit?

    I guess i could sample a serious of days?

  11. #11
    TS Contributor
    Points: 12,227, Level: 72
    Level completed: 45%, Points required for next Level: 223
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,470
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: What model should I use? Mixed-effect model?

    hi,
    That would be a good start. http://www-bcf.usc.edu/~gareth/ISL/

    I would use all the data and treat the people as just another factor.

    regards

  12. #12
    Points: 3,006, Level: 33
    Level completed: 71%, Points required for next Level: 44

    Posts
    177
    Thanks
    1
    Thanked 29 Times in 29 Posts

    Re: What model should I use? Mixed-effect model?

    Quote Originally Posted by Marvin85 View Post
    Anyone??
    To answer smith questions: How would you approach with multiple observations per unit?

    I guess i could sample a serious of days?
    Well lets see,

    First you are calculating an odds ratio of using force, this odds ratio is modified by a few continuous variable- i.e. number of days in office/facility 1/facility 2/special forces; and then modified by a few categorical variables- race, gender etc.

    There are a few strategies depending on what you are trying to draw inference on. If you don't really care about the difference in where they are (or its trivial such that special forces will have more violence than the office) then you can just model those effects using a proportion variable. For example,
    two officers work in time period 1 (4 weeks, or one month)
    officer 1 works 2 weeks in special forces, 1 week in office and half week in facility 1 and 2 respectively so things would be coded as-
    monthly odds ratio = .5 SF + .25 Office + .125 facility 1 + .125 facility 2
    officer 2 works 0 weeks in special forces, 2 weeks in office and a week in facility 1 and 2 respectively so things would be coded as-
    monthly odds ratio = 0 SF + .5 Office + .25 facility 1 + .25 facility 2

    This strategy allows you to control for where they are working.

    Once that is done, you can use a time series to model the rest of the effects such that your model will look something like this-
    odds ratio of violence = categorical variables + proportional work variables + time period + error

    Good luck, and PM me if you have any questions. I do VERY similar modeling with schools/students.

  13. #13
    Points: 8,540, Level: 62
    Level completed: 30%, Points required for next Level: 210

    Posts
    266
    Thanks
    39
    Thanked 1 Time in 1 Post

    Re: What model should I use? Mixed-effect model?

    The42up Thanky so much and I am sorry for the late reply. Your approach is great. I was doing some research in machine learning but I didnt want to go on that direction since I have education in applied statistics. This is the first time I am working in a project like this. Have you seen the sample data set I attached in my first post? Can you elaborate a little more in how I would do this? First of all, does my data structure is appropriate for analysis? What type of regression should run? Regular logistic regression? Can you help me with an example? I would greatly appreciate it...

    Thank you,
    Marvin
    Attached Files

  14. #14
    Points: 568, Level: 11
    Level completed: 36%, Points required for next Level: 32

    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: What model should I use? Mixed-effect model?


    Nokia 5300 XpressMusic is a Nokia Series 40 3rd Edition FP2 mobile phone by Nokia. It was launched in the third quarter of 2006. The phone has a sleek slider design and features a 240×320 pixels (QVGA) TFT display and a 1.3-megapixel (CMOS) camera which can be used in landscape. It has dedicated music buttons on each side which makes it easy to access tracks in music player mode or tune in different stations in radio mode, with a 2.5 mm. headset jack. It has also a powerful loudspeaker at the back for high quality sound output. It also features a removable MicroSD card with a maximum capacity of 2 GB and powered by an ARM9 CPU running at 237 MHz.[2] Nokia 5300 XpressMusic was launched on T-Mobile's USA network on 1 March 2007.

    Nokia 5310 can browse and surf the internet via GPRS. The phone can access different web or mobile sites like Friendster, Yahoo! Mail, Yahoo! Messenger, Google, YouTube, Multiply etc. The phone also features the Active Standby mode which can create shortcuts while on standby mode. It has a dedicated keys on sides let you access to music or just push camera button to start camera or video mode. The best view when you play your video is on panoramic view.

    These are the Menu dien thoai doc options of Nokia 5300: Contacts, Log, Organizer, Gallery, Messaging, Media, Applications, Web, Settings, PTT and the user's SIM network services.

+ Reply to Thread

           




Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats